Atlas  0.7.0
Networking protocol for the Worldforge system.
Anonymous.h
1 // This file may be redistributed and modified only under the terms of
2 // the GNU Lesser General Public License (See COPYING for details).
3 // Copyright 2000-2001 Stefanus Du Toit and Aloril.
4 // Copyright 2001-2005 Alistair Riddoch.
5 // Copyright 2011-2020 Erik Ogenvik.
6 // Automatically generated using gen_cpp.py. Don't edit directly.
7 
8 #ifndef ATLAS_OBJECTS_ENTITY_ANONYMOUS_H
9 #define ATLAS_OBJECTS_ENTITY_ANONYMOUS_H
10 
11 #include <Atlas/Objects/RootEntity.h>
12 #include <Atlas/Objects/SmartPtr.h>
13 
14 namespace Atlas { namespace Objects { namespace Entity {
15 
22 class AnonymousData;
23 typedef SmartPtr<AnonymousData> Anonymous;
24 
25 static const int ANONYMOUS_NO = 42;
26 
29 
32 {
33 protected:
35  explicit AnonymousData(AnonymousData *defaults = nullptr) :
36  RootEntityData((RootEntityData*)defaults)
37  {
38  m_class_no = ANONYMOUS_NO;
39  }
41  ~AnonymousData() override = default;
42 
43 public:
44  // The parent type for this object's superclass
45  static constexpr const char* super_parent = "root_entity";
46  // The default parent type for this object
47  static constexpr const char* default_parent = "anonymous";
48  // The default objtype for this object
49  static constexpr const char* default_objtype = "obj";
51  void setType(const std::string &, int);
52 
54  AnonymousData * copy() const override;
55 
57  bool instanceOf(int classNo) const override;
58 
59 
60 public:
61  template <typename>
62  friend class ::Atlas::Objects::Allocator;
63  static Allocator<AnonymousData> allocator;
64 
65 protected:
67  void reset() override;
68  void free() override;
69 
70 private:
71 
72  static void fillDefaultObjectInstance(AnonymousData& data, std::map<std::string, uint32_t>& attr_data);
73 };
74 
75 } } } // namespace Atlas::Objects::Entity
76 
77 #endif // ATLAS_OBJECTS_ENTITY_ANONYMOUS_H
bool instanceOf(int classNo) const override
Is this instance of some class?
Definition: Anonymous.cpp:42
AnonymousData(AnonymousData *defaults=nullptr)
Construct a AnonymousData class definition.
Definition: Anonymous.h:35
Starting point for entity hierarchy.
Definition: Anonymous.h:31
Starting point for entity hierarchy.
Definition: RootEntity.h:31
void free() override
Free an instance of this class, returning it to the memory pool.
Definition: Anonymous.cpp:19
void reset() override
Resets the object as it&#39;s returned to the pool.
Definition: Anonymous.cpp:26
AnonymousData * copy() const override
Copy this object.
Definition: Anonymous.cpp:37
~AnonymousData() override=default
Default destructor.
void setType(const std::string &, int)
Set the type of this object.
Definition: Anonymous.cpp:31
Definition: Bridge.h:20