Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 30, 2007, 1:12:53 AM (17 years ago)
Author:
landauf
Message:

added NetworkID

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/orxonox.cc

    r266 r362  
    148148        test4 = new A3();
    149149*/
    150 /*
     150
    151151        std::cout << "Test 5\n";
    152152        A1* test5_01 = new A1();
     
    193193
    194194          std::cout << "\n";
    195           std::cout << test5->getIdentifier()->getName() << ": parents:     " << test5->getIdentifier()->getParents().toString() << "\n";
    196           std::cout << test5->getIdentifier()->getName() << ": children:    " << test5->getIdentifier()->getChildren().toString() << "\n";
     195          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): parents:     " << test5->getIdentifier()->getParents().toString() << "\n";
     196          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): children:    " << test5->getIdentifier()->getChildren().toString() << "\n";
    197197        }
    198 */
     198
     199        std::cout << "Class with ID 0: " << ID(0) << " " << ID(0)->getName() << "\n";
     200        std::cout << "Class with ID 1: " << ID(1) << " " << ID(1)->getName() << "\n";
     201        std::cout << "Class with ID 2: " << ID(2) << " " << ID(2)->getName() << "\n";
     202        std::cout << "Class with ID 3: " << ID(3) << " " << ID(3)->getName() << "\n";
     203        std::cout << "Class with ID 4: " << ID(4) << " " << ID(4)->getName() << "\n";
     204        std::cout << "Class with ID 100: " << ID(100) << "\n";
     205        std::cout << "ID of BaseObject: " << Class(BaseObject)->getNetworkID() << "\n";
     206
     207        std::cout << "\nChange ID of BaseObject to 100\n";
     208        Class(BaseObject)->setNetworkID(100);
     209        std::cout << "Class with ID 100: " << ID(100) << "\n";
     210        std::cout << "Class with ID 1: " << ID(1) << "\n";
     211        std::cout << "ID of BaseObject: " << Class(BaseObject)->getNetworkID() << "\n";
     212
     213        std::cout << "\nChange ID of BaseObject to 3\n";
     214        Class(BaseObject)->setNetworkID(3);
     215        std::cout << "Class with ID 100: " << ID(100) << "\n";
     216        std::cout << "Class with ID 1: " << ID(1) << "\n";
     217        std::cout << "Class with ID 3: " << ID(3) << "\n";
     218        std::cout << "ID of BaseObject: " << Class(BaseObject)->getNetworkID() << "\n";
     219        std::cout << "ID of Test1: " << Class(Test1)->getNetworkID() << "\n";
     220
    199221/*
    200222        std::cout << "\n";
     
    452474        delete test9_06;
    453475*/
    454 
     476/*
    455477        std::cout << "Test 10\n";
    456478        Identifier* test10_01 = Class(A1B2);
     
    582604
    583605        std::cout << "13\n";
    584 
     606*/
    585607      }
    586608
Note: See TracChangeset for help on using the changeset viewer.