Collage  1.1.2
High-performance C++ library for developing object-oriented distributed applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
objectFactory.h
1 
2 /* Copyright (c) 2011-2013, Stefan Eilemann <eile@eyescale.ch>
3  * 2012, Daniel Nachbaur <danielnachbaur@gmail.com>
4  *
5  * This file is part of Collage <https://github.com/Eyescale/Collage>
6  *
7  * This library is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Lesser General Public License version 2.1 as published
9  * by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef CO_OBJECTFACTORY_H
22 #define CO_OBJECTFACTORY_H
23 
24 #include <co/object.h> // deleted inline
25 
26 namespace co
27 {
29  {
30  OBJECTTYPE_NONE,
32  };
33 
36  {
37  public:
39  ObjectFactory(){}
40 
42  virtual ~ObjectFactory(){}
43 
49  virtual co::Object* createObject( const uint32_t /*type*/ )
50  { LBUNIMPLEMENTED; return 0; }
51 
53  virtual void destroyObject( co::Object* object, const uint32_t /*type*/ )
54  { delete object; }
55  };
56 }
57 #endif // CO_OBJECTFACTORY_H
ObjectType
Definition: objectFactory.h:28
A distributed object.
Definition: object.h:45
virtual co::Object * createObject(const uint32_t)
Definition: objectFactory.h:49
The interface to create objects, used by ObjectMap.
Definition: objectFactory.h:35
virtual void destroyObject(co::Object *object, const uint32_t)
Delete the given object of the given type.
Definition: objectFactory.h:53
Application-defined objects.
Definition: objectFactory.h:31