2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of COLLADAFramework.
6
Licensed under the MIT Open Source License,
7
for details please see LICENSE file or the website
8
http://www.opensource.org/licenses/mit-license.php
11
#ifndef __COLLADAFW_INSTANCEBASE_H__
12
#define __COLLADAFW_INSTANCEBASE_H__
14
#include "COLLADAFWPrerequisites.h"
15
#include "COLLADAFWObject.h"
21
/** Base class for the instance classes. */
22
template<ClassId classId>
23
class InstanceBase : public ObjectTemplate<classId>
28
* The name attribute is the text string name of this element.
33
/** The unique id of the instantiated object.*/
34
UniqueId mInstanciatedObjectId;
38
/** Constructor. Creates an instance of an object with UniqueId @a instanciatedObjectId.
39
@param instanciatedObjectId The UniqueId of the object instantiated.*/
40
InstanceBase ( const UniqueId& uniqueId, const UniqueId& instanciatedObjectId )
41
: ObjectTemplate<classId>(uniqueId)
42
, mInstanciatedObjectId (instanciatedObjectId )
46
virtual ~InstanceBase() {}
48
/** Returns the name of the node*/
49
const String& getName () const { return mName; }
51
/** Sets the name of the node*/
52
void setName ( const String& name ) { mName = name; }
54
/** Returns the unique id of the instantiated object.*/
55
const UniqueId& getInstanciatedObjectId() const { return mInstanciatedObjectId; }
57
/** Sets the unique id of the instantiated object.*/
58
void setInstanciatedObjectId ( const UniqueId& instanciatedObjectId ) { mInstanciatedObjectId = instanciatedObjectId; }
60
virtual InstanceBase* clone() const { return new InstanceBase(*this); }
63
} // namespace COLLADAFW
65
#endif // __COLLADAFW_INSTANCEBASE_H__