Atlas-C++
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 // Automatically generated using gen_cpp.py.
6 
7 #ifndef ATLAS_OBJECTS_OPERATION_GENERIC_H
8 #define ATLAS_OBJECTS_OPERATION_GENERIC_H
9 
10 #include <Atlas/Objects/RootOperation.h>
11 #include <Atlas/Objects/SmartPtr.h>
12 
13 namespace Atlas { namespace Objects { namespace Operation {
14 
25 class GenericData;
26 typedef SmartPtr<GenericData> Generic;
27 
28 static const int GENERIC_NO = 41;
29 
32 
39 {
40 protected:
42  GenericData(GenericData *defaults = NULL) :
44  {
45  m_class_no = GENERIC_NO;
46  }
48  virtual ~GenericData();
49 
50 public:
52  void setType(const std::string &, int);
53 
55  virtual GenericData * copy() const;
56 
58  virtual bool instanceOf(int classNo) const;
59 
60 
61  virtual void iterate(int& current_class, std::string& attr) const
62  {if(current_class == GENERIC_NO) current_class = -1; RootOperationData::iterate(current_class, attr);}
63 
64  //freelist related things
65 public:
66  static GenericData *alloc();
67  virtual void free();
68 
73  virtual GenericData *getDefaultObject();
74 
80 private:
81  static GenericData *defaults_GenericData;
82  static GenericData *begin_GenericData;
83 };
84 
85 } } } // namespace Atlas::Objects::Operation
86 
87 #endif // ATLAS_OBJECTS_OPERATION_GENERIC_H
Base operation for all operators.
Definition: RootOperation.h:40
void setType(const std::string &, int)
Set the type of this object.
GenericData(GenericData *defaults=NULL)
Construct a GenericData class definition.
Definition: Generic.h:42
Base operation for all operators.
Definition: Generic.h:38
virtual GenericData * copy() const
Copy this object.
The Atlas namespace.
Definition: Bridge.h:20
virtual void iterate(int &current_class, std::string &attr) const
Iterate over the attributes of this instance.
Definition: Generic.h:61
virtual bool instanceOf(int classNo) const
Is this instance of some class?
virtual ~GenericData()
Default destructor.
virtual GenericData * getDefaultObject()
Get the reference object that contains the default values for attributes of instances of the same cla...
static GenericData * getDefaultObjectInstance()
Get the reference object that contains the default values for attributes of instances of this class...
virtual void free()
Free an instance of this class, returning it to the memory pool.
virtual void iterate(int &current_class, std::string &attr) const
Iterate over the attributes of this instance.

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.