Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

Attribute objects

The GOMLib allows one other generic objects use, the AGraphic object. So, it is possible to use container object (see section Container objects) to define some attributes between objects. The GOMLib proposes too implementations of standard attribute objects (AAngle, ADistance, ALabel, and so on).

The following function gives an example of attributes use with an OHL object.

    void ohlAttribute()
    {
            OLine *l1,*l2;
            OHL *h1 = new OHL();
            l1 = new OLine(1,1,6,6);
            h1->newObject(l1);
            l2 = new OLine(6,6,6,20);
            h1->newObject(l2);
            AGraphic* a = new AAngle(l1->getAngle(*l2));
            h1->newAttribute(a);
            h1->print();
            h1->~OHL();
    }       //de
The following function gives an example of attributes use with an OGraph object.

    void graphAttribute()
    {
            OLine *l1,*l2;
            OGraph *o1 = new OGraph();
            l1 = new OLine(1,1,6,6);
            o1->newNode(l1);
            l2 = new OLine(6,6,6,20);
            o1->newNode(l2);
            AGraphic* a = new AAngle(l1->getAngle(*l2));
            o1->newEdge(0,1,a);
            o1->print();
            o1->~OGraph();
    }       //de

Generated on Fri Jul 30 19:21:03 2004 for GOMLib by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001