Class name suggestions?

Ok, I’ve got a class I’d like to release, but am stuck trying to think of a good name for it!

Basically it’s a tree node object, sort of an “XmlElement on steroids”… It contains a set of named properties (these are implemented as ‘var’ objects so they can store numbers natively rather than having to convert them to strings like xml does). Like xml, it can contain any number of sub-nodes. But its killer feature is that every operation you do to the tree (add/remove nodes, change/remove properties) is undoable. It also lets you attach listeners to any node to find out when properties or the tree structure changes. And because it’s similar in structure to XML, it can be converted to/from XML for easy storage in a readable format.

When I was writing the original Jucer the thing that was an absolute PITA was that every time I added any option that changed an item’s properties, I had to write an UndoableAction class to implement it - this took ages and made the code really bloated and unreadable. But using one of these trees, it’d handle all of that for you, and it’d be a breeze to build powerful editors for complex structures.

So it’s a cool class, but what should I call it!? VarTree, SmartNode, VarNode, Node, SmartTree, PowerTree… ? All a bit naff… Ideas please!

PropertyTreeNode ?

Good, but maybe a bit long… I’m not afraid of long class names, but this feels like it should be a bit more concise.

…thinking of words for “things that hold stuff”… like Vessel, Tank, Vat, Container, Cask, Tub, Box, Chest, Trunk…


should be thinking about creating a class for creating zip files
Library Poco
Poco zip class Compress

Yes… it’s not actually XML, though.

How about DataTree?

Not bad. Or DataNode.

I’m tending towards Tank at the moment - that has a nice ring to it, and sounds powerful!

and I’m pretty sure no one would ever think to Tank when searching for a class that do something like that :slight_smile:

DataNode or PropertyNode sound good to me… PropertyNode is more appropriate if you actually inherit the PropertySet interface.

or DataElement, to recall the fact that is more or less like the XmlElement structure

This sounds like a perfect candidate for an in memory mapping of the JSON format which I find more uniform and self consistent than XML.

as for the name, DataNode or PropertyNode sounds good to me but var or Variant would do as well.

I think it’d be a good idea for it to have methods to load/save it as either JSON/XML/binary. Not sure if it’d be appropriate for loading 3rd party JSON data, as it’s probably not an exact mapping for the JSON grammar.

How about “BagOfHolding”?

DataNode or PropertyNode sounds good, but since it is smart enough to support undo-redo SmartDataNode
could be worth while.

Pocket or Suitcase are suitable names for me, and they denote some sort of imagination, rather than speaking always programmer’s speak…





I wish I hadn’t asked now! Too many choices is making it harder to decide!

Whatever name you give it will be fine.
I can really use this “XmlElement on steroids” class, sounds very interesting.
Can’t wait!

Or maybe KillerTree
or just Killer!!!