Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2007, 2:07:01 AM (17 years ago)
Author:
landauf
Message:

moved common object-functions and -variables (like isA() and name_) from BaseObject to OrxonoxClass, so they can still be used while iterating through a list of objects inheriting from an interface.

File:
1 edited

Legend:

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

    r362 r366  
    474474        delete test9_06;
    475475*/
    476 /*
     476
    477477        std::cout << "Test 10\n";
    478478        Identifier* test10_01 = Class(A1B2);
     
    509509        {
    510510            test10_08 = ID("A2B1C1")->fabricate();
    511             test10_08->name_ = "A2B1C1#";
    512             test10_08->name_ += ('0' + i);
     511            std::string objName = "A2B1C1#";
     512            objName += '0' + i;
     513            test10_08->setName(objName);
    513514
    514515            if (i == 0)
     
    531532
    532533        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::start(); it; ++it)
    533             std::cout << "Name: " << it->name_ << "\n";
     534            std::cout << "Name: " << it->getName() << "\n";
    534535
    535536        std::cout << "3\n";
    536537        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::end(); it; --it)
    537             std::cout << "Name: " << it->name_ << "\n";
     538            std::cout << "Name: " << it->getName() << "\n";
    538539
    539540        std::cout << "4\n";
     
    553554        std::cout << "5\n";
    554555        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::start(); it; ++it)
    555             std::cout << "Name: " << it->name_ << "\n";
     556            std::cout << "Name: " << it->getName() << "\n";
    556557
    557558        std::cout << "6\n";
    558559        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::end(); it; --it)
    559             std::cout << "Name: " << it->name_ << "\n";
     560            std::cout << "Name: " << it->getName() << "\n";
    560561
    561562        std::cout << "7\n";
     
    575576        std::cout << "8\n";
    576577        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::start(); it; ++it)
    577             std::cout << "Name: " << it->name_ << "\n";
     578            std::cout << "Name: " << it->getName() << "\n";
    578579
    579580        std::cout << "9\n";
    580581        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::end(); it; --it)
    581             std::cout << "Name: " << it->name_ << "\n";
     582            std::cout << "Name: " << it->getName() << "\n";
    582583
    583584        std::cout << "10\n";
     
    597598        std::cout << "11\n";
    598599        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::start(); it; ++it)
    599             std::cout << "Name: " << it->name_ << "\n";
     600            std::cout << "Name: " << it->getName() << "\n";
    600601
    601602        std::cout << "12\n";
    602603        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::end(); it; --it)
    603             std::cout << "Name: " << it->name_ << "\n";
     604            std::cout << "Name: " << it->getName() << "\n";
    604605
    605606        std::cout << "13\n";
    606 */
     607
    607608      }
    608609
Note: See TracChangeset for help on using the changeset viewer.