Collage  1.7.0
High-performance C++ library for developing object-oriented distributed applications.
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() {}
41  virtual ~ObjectFactory() {}
47  virtual co::Object* createObject(const uint32_t /*type*/)
48  {
49  LBUNIMPLEMENTED;
50  return 0;
51  }
52 
54  virtual void destroyObject(co::Object* object, const uint32_t /*type*/)
55  {
56  delete object;
57  }
58 };
59 }
60 #endif // CO_OBJECTFACTORY_H
ObjectType
Definition: objectFactory.h:28
A distributed object.
Definition: object.h:47
virtual co::Object * createObject(const uint32_t)
Definition: objectFactory.h:47
Object-oriented network library.
Definition: barrier.h:27
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:54
Application-defined objects.
Definition: objectFactory.h:31