Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9653 for code


Ignore:
Timestamp:
Aug 16, 2013, 9:39:29 PM (11 years ago)
Author:
landauf
Message:

register Configurable in the framework

Location:
code/branches/core6
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/libraries/core/config/CMakeLists.txt

    r9560 r9653  
    66  ConfigFileManager.cc
    77  ConfigFileSection.cc
     8  Configurable.cc
    89  ConfigValueContainer.cc
    910  SettingsConfigFile.cc
  • code/branches/core6/src/libraries/core/config/Configurable.h

    r9577 r9653  
    4848    {
    4949        public:
     50            Configurable();
     51
    5052            /// Function to collect the SetConfigValue-macro calls.
    5153            void setConfigValues() {};
  • code/branches/core6/test/core/class/IdentifierClassHierarchyTest.cc

    r9651 r9653  
    132132                    registerClass("Context", new ClassFactoryWithContext<Context>());
    133133                    registerClass("Listable", new ClassFactoryWithContext<Listable>());
     134                    registerClass("Configurable", new ClassFactoryNoArgs<Configurable>());
    134135                    registerClass("OrxonoxInterface", new ClassFactoryNoArgs<OrxonoxInterface>());
    135136                    registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
     
    232233        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxInterface)));
    233234
    234         EXPECT_EQ(3u, identifier->getParents().size());
    235         EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    236         EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     235        EXPECT_EQ(4u, identifier->getParents().size());
     236        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     237        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     238        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    237239        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    238240    }
     
    255257        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxInterface)));
    256258
    257         EXPECT_EQ(3u, identifier->getParents().size());
    258         EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    259         EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     259        EXPECT_EQ(4u, identifier->getParents().size());
     260        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     261        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     262        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    260263        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    261264    }
     
    278281        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseInterface1)));
    279282
    280         EXPECT_EQ(4u, identifier->getParents().size());
    281         EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    282         EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     283        EXPECT_EQ(5u, identifier->getParents().size());
     284        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     285        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     286        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    283287        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    284288        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseInterface1)));
     
    300304        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseInterface2)));
    301305
    302         EXPECT_EQ(4u, identifier->getParents().size());
    303         EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    304         EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     306        EXPECT_EQ(5u, identifier->getParents().size());
     307        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     308        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     309        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    305310        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    306311        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseInterface2)));
     
    328333        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass)));
    329334
    330         EXPECT_EQ(3u, identifier->getParents().size());
    331         EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    332         EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     335        EXPECT_EQ(4u, identifier->getParents().size());
     336        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     337        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     338        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    333339        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    334340    }
     
    345351        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
    346352
    347         EXPECT_EQ(4u, identifier->getParents().size());
    348         EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    349         EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     353        EXPECT_EQ(5u, identifier->getParents().size());
     354        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     355        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     356        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    350357        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    351358        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
     
    364371        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Interface1)));
    365372
    366         EXPECT_EQ(7u, identifier->getParents().size());
    367         EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    368         EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     373        EXPECT_EQ(8u, identifier->getParents().size());
     374        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     375        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     376        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    369377        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    370378        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
     
    387395        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Interface2)));
    388396
    389         EXPECT_EQ(9u, identifier->getParents().size());
    390         EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    391         EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     397        EXPECT_EQ(10u, identifier->getParents().size());
     398        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     399        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     400        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    392401        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    393402        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
     
    412421        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Interface2)));
    413422
    414         EXPECT_EQ(9u, identifier->getParents().size());
    415         EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    416         EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     423        EXPECT_EQ(10u, identifier->getParents().size());
     424        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     425        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     426        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    417427        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    418428        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
     
    437447        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseInterface2)));
    438448
    439         EXPECT_EQ(7u, identifier->getParents().size());
    440         EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    441         EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     449        EXPECT_EQ(8u, identifier->getParents().size());
     450        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     451        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     452        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    442453        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    443454        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
  • code/branches/core6/test/core/class/IdentifierExternalClassHierarchyTest.cc

    r9646 r9653  
    4444                virtual void SetUp()
    4545                {
     46                    registerClass("Context", new ClassFactoryWithContext<Context>());
     47                    registerClass("Listable", new ClassFactoryWithContext<Listable>());
    4648                    registerClass("Interface", static_cast<ClassFactory<Interface>*>(NULL), false).inheritsFrom(Class(Identifiable));
    4749                    registerClass("BaseClass", new ClassFactoryNoArgs<BaseClass>());
  • code/branches/core6/test/core/class/IdentifierSimpleClassHierarchyTest.cc

    r9651 r9653  
    4848                    registerClass("Context", new ClassFactoryWithContext<Context>());
    4949                    registerClass("Listable", new ClassFactoryWithContext<Listable>());
     50                    registerClass("Configurable", new ClassFactoryNoArgs<Configurable>());
    5051                    registerClass("OrxonoxInterface", new ClassFactoryNoArgs<OrxonoxInterface>());
    5152                    registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
     
    101102        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxInterface)));
    102103
    103         EXPECT_EQ(3u, identifier->getParents().size());
     104        EXPECT_EQ(4u, identifier->getParents().size());
    104105        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    105106        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     107        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    106108        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    107109    }
     
    120122        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass)));
    121123
    122         EXPECT_EQ(3u, identifier->getParents().size());
     124        EXPECT_EQ(4u, identifier->getParents().size());
    123125        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    124126        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     127        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    125128        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    126129    }
     
    138141        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
    139142
    140         EXPECT_EQ(6u, identifier->getParents().size());
     143        EXPECT_EQ(7u, identifier->getParents().size());
    141144        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
    142145        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
     146        EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
    143147        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    144148        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
Note: See TracChangeset for help on using the changeset viewer.