reSIProcate/stack  9694
Classes | Functions
testId.cxx File Reference
#include <iostream>
#include "rutil/Id.hxx"
Include dependency graph for testId.cxx:

Go to the source code of this file.

Classes

class  A

Functions

int main (int, char *[])

Function Documentation

int main ( int  ,
char *  [] 
)

Definition at line 53 of file testId.cxx.

References A(), A::callme(), and A::getId().

{
    A arr[4];
    
    for(unsigned int i = 0 ; i < sizeof(arr)/sizeof(*arr); i++)
    {
        cout << "arr["<<i<<"].getId().value() == " << arr[i].getId().value() 
             << endl
             << "  and access example: "
             << "   arr["<<i<<"].getId()->callme() == " 
             << arr[i].getId()->callme()
             << endl;
    }


    A* na = new A;

    A::Id aid( na->getId());

    cout << "na==" << (void*)na << endl;
    cout << "na->callme(): " << na->callme() << endl;
    if (aid.valid())
    {
        cout << "aid is valid" << endl;
        cout << "aid->callme() " << aid->callme() << endl;
        cout << "deleting na" << endl;
    }
    delete na;
    cout << "aid.valid() == " << aid.valid() << endl;
    
    return 0;
}

Here is the call graph for this function: