Chapter 14. ChunkOrgTree File Format

A Chunk Organization Tree (OrgTree) is used to put a logical tree structure onto a ConfigChunkDB. VjControl uses the OrgTree to provide a file-folder-like view of a config file. The OrgTree file is composed of OrgTreeElements, which look like this:

begin "name"
      contents
end

where contents is a list of OrgTreeElements and chunk type names, separated by whitespace (Note that that's chunk type names, not tokens). The entire file is a single OrgTreeElement (usually called "root", though the GUI never actually uses its name) containing all the other elements. Here's a real example:

Begin "Zelda"
    Begin "Input"
        Begin "Proxies and Aliases"
            "ProxyAlias"
        End
        Begin "Input Devices"
            "Keyboard"
            "flock"
            "ibox"
            "Cyberglove"
            "ThreeDMouse"
            "DummyPosition"
        End
    End
    Begin "Expert Only"
        Begin "Performer API"
            "ApiPerformer"
        End
        Begin "Environment Manager"
            "Environment Manager"
            "EM File Output"
        End
    End
    Begin "*"
    End
End   

This OrgTree will create a tree view where, for example, the top level will have a subfolder called "Input" containing a folder called "Input Devices" which will list all chunks of types Keyboard, flock, ibox, etc.

There are two important things to note: first, it's entirely ok for chunk type names to appear in multiple folders. Second, the last OrgTreeElement has the name "*" and no children. Any OrgTreeElement named "*" will represent a folder that lists all available chunks of any type.