Atlas-C++
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 Erik Ogenvik.
6 // Automatically generated using gen_cpp.py.
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 = 40;
26 
29 
32 {
33 protected:
35  AnonymousData(AnonymousData *defaults = nullptr) :
36  RootEntityData((RootEntityData*)defaults)
37  {
38  m_class_no = ANONYMOUS_NO;
39  }
41  ~AnonymousData() override = default;
42 
43 public:
45  void setType(const std::string &, int);
46 
48  AnonymousData * copy() const override;
49 
51  bool instanceOf(int classNo) const override;
52 
53 
54  void iterate(int& current_class, std::string& attr) const override
55  {if(current_class == ANONYMOUS_NO) current_class = -1; RootEntityData::iterate(current_class, attr);}
56 
57 public:
58  template <typename>
59  friend class ::Atlas::Objects::Allocator;
60  static Allocator<AnonymousData> allocator;
61 
62 protected:
64  void reset() override;
65  void free() override;
66 
67 private:
68 
69  static void fillDefaultObjectInstance(AnonymousData& data, std::map<std::string, int32_t>& attr_data);
70 };
71 
72 } } } // namespace Atlas::Objects::Entity
73 
74 #endif // ATLAS_OBJECTS_ENTITY_ANONYMOUS_H
void iterate(int &current_class, std::string &attr) const override
Iterate over the attributes of this instance.
Starting point for entity hierarchy.
Definition: Anonymous.h:31
AnonymousData * copy() const override
Copy this object.
~AnonymousData() override=default
Default destructor.
void free() override
Free an instance of this class, returning it to the memory pool.
void reset() override
Resets the object as it&#39;s returned to the pool.
The Atlas namespace.
Definition: Bridge.h:20
AnonymousData(AnonymousData *defaults=nullptr)
Construct a AnonymousData class definition.
Definition: Anonymous.h:35
bool instanceOf(int classNo) const override
Is this instance of some class?
void iterate(int &current_class, std::string &attr) const override
Iterate over the attributes of this instance.
Definition: Anonymous.h:54
Starting point for entity hierarchy.
Definition: RootEntity.h:31
Definition: Decoder.h:16
Trait which handles allocation of instances of BaseObject.
Definition: BaseObject.h:63
void setType(const std::string &, int)
Set the type of this object.

Copyright 2000-2004 the respective authors.

This document can be licensed under the terms of the GNU Free Documentation License or the GNU General Public License and may be freely distributed under the terms given by one of these licenses.