~ubuntu-branches/ubuntu/breezy/atlas-cpp/breezy

« back to all changes in this revision

Viewing changes to Atlas/Objects/Anonymous.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2005-10-02 11:41:44 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051002114144-8qmn4d1cdn9g27ta
Tags: 0.5.98-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-2004 Al Riddoch.
 
5
// Automatically generated using gen_cpp.py.
 
6
 
 
7
#ifndef ATLAS_OBJECTS_ENTITY_ANONYMOUS_H
 
8
#define ATLAS_OBJECTS_ENTITY_ANONYMOUS_H
 
9
 
 
10
#include <Atlas/Objects/RootEntity.h>
 
11
#include <Atlas/Objects/SmartPtr.h>
 
12
 
 
13
namespace Atlas { namespace Objects { namespace Entity { 
 
14
 
 
15
/** Starting point for entity hierarchy
 
16
 
 
17
Later in hierarchy tree objtype changes to 'object' when actual game objects are made.
 
18
 
 
19
*/
 
20
 
 
21
class AnonymousData;
 
22
typedef SmartPtr<AnonymousData> Anonymous;
 
23
 
 
24
static const int ANONYMOUS_NO = 40;
 
25
 
 
26
/// \brief Starting point for entity hierarchy.
 
27
///
 
28
/** Later in hierarchy tree objtype changes to 'object' when actual game objects are made.
 
29
 */
 
30
class AnonymousData : public RootEntityData
 
31
{
 
32
protected:
 
33
    /// Construct a AnonymousData class definition.
 
34
    AnonymousData(AnonymousData *defaults = NULL) : 
 
35
        RootEntityData((RootEntityData*)defaults)
 
36
    {
 
37
        m_class_no = ANONYMOUS_NO;
 
38
    }
 
39
    /// Default destructor.
 
40
    virtual ~AnonymousData();
 
41
 
 
42
public:
 
43
    /// Set the type of this object.
 
44
    void setType(const std::string &, int);
 
45
 
 
46
    /// Copy this object.
 
47
    virtual AnonymousData * copy() const;
 
48
 
 
49
    /// Is this instance of some class?
 
50
    virtual bool instanceOf(int classNo) const;
 
51
 
 
52
 
 
53
    virtual void iterate(int& current_class, std::string& attr) const
 
54
        {if(current_class == ANONYMOUS_NO) current_class = -1; RootEntityData::iterate(current_class, attr);}
 
55
 
 
56
    //freelist related things
 
57
public:
 
58
    static AnonymousData *alloc();
 
59
    virtual void free();
 
60
 
 
61
    /// \brief Get the reference object that contains the default values for
 
62
    /// attributes of instances of the same class as this object.
 
63
    ///
 
64
    /// @return a pointer to the default object.
 
65
    virtual AnonymousData *getDefaultObject();
 
66
 
 
67
    /// \brief Get the reference object that contains the default values for
 
68
    /// attributes of instances of this class.
 
69
    ///
 
70
    /// @return a pointer to the default object.
 
71
    static AnonymousData *getDefaultObjectInstance();
 
72
private:
 
73
    static AnonymousData *defaults_AnonymousData;
 
74
    static AnonymousData *begin_AnonymousData;
 
75
};
 
76
 
 
77
} } } // namespace Atlas::Objects::Entity
 
78
 
 
79
#endif // ATLAS_OBJECTS_ENTITY_ANONYMOUS_H