I'm working on something at the moment that requires me to get the user to pass in a name that will act as a reference to a particular data structure (as you type names into buffer~/sends/colls etc. etc.). In this case the data structure is the top node of a data hierarchy. The structure in question might be be owned by an object of one of a number of classes.
Therefore, in order to make this work safely, I want to check that the name I'm being handed is actually bound to one of these structures, and not something else (like a send or whatever), before I start examining the contents of its memory. If the structure is a max class I can use object_class or object_classname or whatever to determine that I have the right kind of object.
However, what I'm not clear on is where and how should I setup this data structure class. The problems being that this common class needs to be accessible to several other classes and should not be accessible by typing into an object box.
Any one done this and have any ideas, tips?