Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/core/Factory.cc @ 632

Last change on this file since 632 was 258, checked in by landauf, 17 years ago

merged object-hierarchy back to trunk

File size: 495 bytes
Line 
1#include "Factory.h"
2#include "Identifier.h"
3
4namespace orxonox
5{
6    Factory* Factory::pointer_s = NULL;
7
8    Identifier* Factory::getIdentifier(const std::string& name)
9    {
10        if (!pointer_s)
11            pointer_s = new Factory;
12
13        return pointer_s->identifierMap_[name];
14    }
15
16    void Factory::add(const std::string& name, Identifier* identifier)
17    {
18        if (!pointer_s)
19            pointer_s = new Factory;
20
21        pointer_s->identifierMap_[name] = identifier;
22    }
23}
Note: See TracBrowser for help on using the repository browser.