Thread: Using XML? My own binary system? A paint by number scheme?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    Absent Minded Programmer
    Join Date
    May 2005
    Posts
    968
    Will a root node structure or class and a vector of children survive through a file? all that is done by value right? So therefore I can put something in a vector, write it to a file, then retrieve the vector with no problems right?

    The only thing I really know, is that I need to represent a tree structure in a binary file.

    I can probably do it in the same way I do it in my C++ code, with a few minor modifications.

    Instead of a vector of the children themselves, I need a struct Node, with an ID according to its type, Transformation is 0, geometry is 1, etc etc...

    It also needs to hold a vector of children, again based on ID's...

    Soooo, when I tell my program, after I load the file..

    To create a root node of type 0, with a 1 as a child, it knows to create a DOF node, then create a new geometry node, and set the DOF node as the geometry nodes parent, then I can just add that to the tree.

    Simple :d
    Last edited by Shamino; 03-07-2006 at 08:49 AM.
    Sometimes I forget what I am doing when I enter a room, actually, quite often.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue w/ Guess My Number Program
    By mkylman in forum C++ Programming
    Replies: 5
    Last Post: 08-23-2007, 01:31 AM
  2. binary search tree and xml
    By sweets in forum C++ Programming
    Replies: 1
    Last Post: 03-16-2004, 04:21 PM
  3. Number system base M, print numbers N digits wide...
    By biterman in forum C Programming
    Replies: 12
    Last Post: 11-19-2001, 04:31 AM
  4. The hexadecimal number system
    By Rigun in forum C Programming
    Replies: 1
    Last Post: 11-13-2001, 09:47 PM
  5. Array of boolean
    By DMaxJ in forum C++ Programming
    Replies: 11
    Last Post: 10-25-2001, 11:45 PM