Atlas 0.7.0
Networking protocol for the Worldforge system.
Generic.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_OPERATION_GENERIC_H
9#define ATLAS_OBJECTS_OPERATION_GENERIC_H
10
11#include <Atlas/Objects/RootOperation.h>
12#include <Atlas/Objects/SmartPtr.h>
13
14namespace Atlas { namespace Objects { namespace Operation {
15
26class GenericData;
27typedef SmartPtr<GenericData> Generic;
28
29static const int GENERIC_NO = 43;
30
33
40{
41protected:
43 explicit GenericData(GenericData *defaults = nullptr) :
45 {
46 m_class_no = GENERIC_NO;
47 }
49 ~GenericData() override = default;
50
51public:
52 // The parent type for this object's superclass
53 static constexpr const char* super_parent = "root_operation";
54 // The default parent type for this object
55 static constexpr const char* default_parent = "generic";
56 // The default objtype for this object
57 static constexpr const char* default_objtype = "op";
59 void setType(const std::string &, int);
60
62 GenericData * copy() const override;
63
65 bool instanceOf(int classNo) const override;
66
67
68public:
69 template <typename>
70 friend class ::Atlas::Objects::Allocator;
71 static Allocator<GenericData> allocator;
72
73protected:
75 void reset() override;
76 void free() override;
77
78private:
79
80 static void fillDefaultObjectInstance(GenericData& data, std::map<std::string, uint32_t>& attr_data);
81};
82
83} } } // namespace Atlas::Objects::Operation
84
85#endif // ATLAS_OBJECTS_OPERATION_GENERIC_H
Base operation for all operators.
Definition: Generic.h:40
bool instanceOf(int classNo) const override
Is this instance of some class?
Definition: Generic.cpp:42
void setType(const std::string &, int)
Set the type of this object.
Definition: Generic.cpp:31
GenericData(GenericData *defaults=nullptr)
Construct a GenericData class definition.
Definition: Generic.h:43
void free() override
Free an instance of this class, returning it to the memory pool.
Definition: Generic.cpp:19
GenericData * copy() const override
Copy this object.
Definition: Generic.cpp:37
~GenericData() override=default
Default destructor.
void reset() override
Resets the object as it's returned to the pool.
Definition: Generic.cpp:26
Base operation for all operators.
Definition: RootOperation.h:42
Definition: Bridge.h:20