Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. composite pattern serializing

composite pattern serializing

Scheduled Pinned Locked Moved Design and Architecture
csharpdata-structuresquestionregex
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jarno Burger
    wrote on last edited by
    #1

    *i am a starter , trying to learn the GOF patterns. i am using vb.net , understand c#. still wan't a job in holland as starter in vb.net ;). i am a person who doesn't want to have full blown solutions , i want to learn by coding , what is happening deep inside the logic. *i am trying to serialize my tree , filled with nodes that work like groups(with nodes) / transforms(leaf) / 3d-meshes(boxes/ball/other primitives) in a world node. yes i am trying to share my servers '3d world' with my clients. *but when i try to serialize my tree to xml , i end up with errors like : -my leaf objects cannot have children. -xml serializer cannot recognize what kind of object a child is. *i am now trying to build my personal serializer , that breaks up my tree into a array of objects , and then seperately serializes each object. *in the future i want to grasp the idea of sending the whole world state and the delta-state (difference in worlds , inbetween two times). *did anybody found some examples. or know some ideas how to help me ? :omg:

    Jarno Burger Video Jockey

    J 1 Reply Last reply
    0
    • J Jarno Burger

      *i am a starter , trying to learn the GOF patterns. i am using vb.net , understand c#. still wan't a job in holland as starter in vb.net ;). i am a person who doesn't want to have full blown solutions , i want to learn by coding , what is happening deep inside the logic. *i am trying to serialize my tree , filled with nodes that work like groups(with nodes) / transforms(leaf) / 3d-meshes(boxes/ball/other primitives) in a world node. yes i am trying to share my servers '3d world' with my clients. *but when i try to serialize my tree to xml , i end up with errors like : -my leaf objects cannot have children. -xml serializer cannot recognize what kind of object a child is. *i am now trying to build my personal serializer , that breaks up my tree into a array of objects , and then seperately serializes each object. *in the future i want to grasp the idea of sending the whole world state and the delta-state (difference in worlds , inbetween two times). *did anybody found some examples. or know some ideas how to help me ? :omg:

      Jarno Burger Video Jockey

      J Offline
      J Offline
      Jonathan Davies
      wrote on last edited by
      #2

      Hi, trying to learn the GOF patterns Good thing to learn about, I finally bought the book a few months ago. trying to serialize my tree , filled with nodes I had a look into serializing a tree and I got as far as serializing the objects contained within the nodes and leaves but not the actual 'tree' information such as child/parent/leaf used to construct the tree. Which meant I could not reconstruct it. When running my (C++) program I used a Windows tree control CTreeViewCtrl to visualize the data and a third party tree container to actually hold and manipulate the data and linked the two together. I serialized the various classes that made up the objects held in the tree container using the Boost library but was not serializing the container structure. The question then arose as to should I serialize the container - which would then make the program dependant upon that container. If I did, how? This is where I left it a few months ago. my leaf objects cannot have children. Leaves cannot have children, thats correct -xml serializer cannot recognize what kind of object a child is. I used the Boost library which got round this by allowing simple additions to class code to allow each object, when serialized, to store what type of object it was - and what it inherited from. Reconstructing then created the correct objects.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups