- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# FCDocument/FCDObject.h

Go to the documentation of this file.

    00001 /*
    00002     Copyright (C) 2005-2007 Feeling Software Inc.
    00003     Portions of the code are:
    00004     Copyright (C) 2005-2007 Sony Computer Entertainment America
    00005
    00006     MIT License: http://www.opensource.org/licenses/mit-license.php
    00007 */
    00008
    00014 #ifndef __FCD_OBJECT_H_
    00015 #define __FCD_OBJECT_H_
    00016
    00017 #ifndef _FU_PARAMETERIZABLE_H_
    00018 #include "FUtils/FUParameterizable.h"
    00019 #endif // _FU_PARAMETERIZABLE_H_
    00020
    00021 class FCDocument;
    00022
    00043 class FCOLLADA_EXPORT FCDObject : public FUParameterizable
    00044 {
    00045 private:
    00046     DeclareObjectType(FUParameterizable);
    00047
    00048     // The COLLADA document that owns this object
    00049     FCDocument* document;
    00050
    00051     // An handle which has no meaning to FCollada but is available for users to
    00052     // attach objects to most FCollada objects.
    00053     void* userHandle;
    00054
    00055 public:
    00059     DeclareFlag(Transient, 0);
    00061     DeclareFlag(NewChild, 1);
    00063     DeclareFlagCount(2);
    00065 public:
    00068     FCDObject(FCDocument* document);
    00069
    00071     virtual ~FCDObject();
    00072
    00075     inline FCDocument* GetDocument() { return document; }
    00076     inline const FCDocument* GetDocument() const { return document; }
    00081     inline bool IsLocal(const FCDObject* object) const { return document == object->document; }
    00082
    00086     inline bool IsExternal(const FCDObject* object) const { return document != object->document; }
    00087
    00092     inline void* GetUserHandle() const { return userHandle; }
    00093
    00098     inline void SetUserHandle(void* handle) { userHandle = handle; SetDirtyFlag(); }
    00099
    00101     virtual void SetValueChange() { SetValueChangedFlag(); }
    00102 };
    00103
    00104 #endif // __FCD_OBJECT_H_