FCDocument/FCDObject.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2005-2006 Feeling Software Inc.
00003     MIT License: http://www.opensource.org/licenses/mit-license.php
00004 */
00005 
00011 #ifndef __FCD_OBJECT_H_
00012 #define __FCD_OBJECT_H_
00013 
00014 #include "FUtils/FUObject.h"
00015 #include "FCDocument/FCDocument.h"
00016 
00029 class FCOLLADA_EXPORT FCDObject : public FUObject
00030 {
00031 private:
00032     DeclareObjectType;
00033 
00034     // An handle which has no meaning to FCollada but is available for users to
00035     // attach objects to most FCollada objects.
00036     void* userHandle;
00037 
00038     // Don't use this constructor directly.
00039     FCDObject(FUObjectContainer* container);
00040 
00041 public:
00044     FCDObject(FCDocument* document);
00045 
00047     virtual ~FCDObject() {}
00048 
00051     inline FCDocument* GetDocument() { return (FCDocument*) GetContainer(); }
00052     inline FCDocument* GetDocument() const { return (FCDocument*) GetContainer(); } 
00058     inline void* GetUserHandle() const { return userHandle; }
00059     
00064     inline void SetUserHandle(void* handle) { userHandle = handle; }
00065 };
00066 
00080 class FCOLLADA_EXPORT FCDObjectWithId : public FCDObject
00081 {
00082 private:
00083     DeclareObjectType;
00084 
00085     string daeId;
00086     bool hasUniqueId;
00087 
00088 public:
00092     FCDObjectWithId(FCDocument* document, const char* baseId = "ObjectWithID");
00093 
00095     virtual ~FCDObjectWithId();
00096 
00101     const string& GetDaeId() const;
00102 
00108     void SetDaeId(const string& id);
00109 
00115     void SetDaeId(string& id);
00116 
00120     void RemoveDaeId();
00121 
00126     void Clone(FCDObjectWithId* clone) const;
00127 };
00128 
00129 #endif // __FCD_OBJECT_H_

Generated on Fri May 12 16:44:39 2006 for FCollada by  doxygen 1.4.6-NO