Home You are here: Home > Support > Reference v1.0

Change language: German

Locating objects and members

Every class derived from exom::XmObject defines an object hierarchy. All objects and members (member data and functions) can be located by an unique path. These paths are implemented by exom::XmPath within the exom framework.

Locating starts always from an object and traverse down the object hierarchy. All subsequent objects and members are identified by their dedicated instance of exom::XmID. These ids are appended to a path instance by using the exom::XmPath::operator<<().

For example the member m_MyInt in the following exom::XmObject derived class

class MyClass : public XmObject
    int         m_MyInt;
    void    manage (XmMan& m)
        m.manInt32 (m_MyInt,    myns.ATM_MY_INT);

can be accessed by the following path:

    MyClass my;
    XmPathObj path (&my);
    path << myns.ATM_MY_INT;

Connecting paths

For more flexibility paths in the exom framework can be connected to each other. This can be done by using exom::XmPathRef which will use another path as its base. So the object referenced by the base path will be the entry point for the referencing path.

This provide the possibility within an GUI application to connect a toolbar button like 'Delete' to the current selection. In this case the current selection will be the base path and the 'Delete' path will reference this base path. Even if the current selected object change, the connected path instance remains unaffected.

The following code fragment illustares this example:

    XmPathRef (&m_Selection) << xmn.FCN_DELETE;

Copyright © 2006 Praetz Software Development - www.exomware.com