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

- File List
- File Members

# FCDocument/FCDExternalReferenceManager.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_EXTERNAL_REFERENCE_MANAGER_H_
    00015 #define _FCD_EXTERNAL_REFERENCE_MANAGER_H_
    00016
    00017 #ifndef __FCD_OBJECT_H_
    00018 #include "FCDocument/FCDObject.h"
    00019 #endif // __FCD_OBJECT_H_
    00020
    00021 class FCDEntityInstance;
    00022 class FCDEntityReference;
    00023 class FCDPlaceHolder;
    00024
    00038 class FCOLLADA_EXPORT FCDExternalReferenceManager : public FCDObject
    00039 {
    00040 private:
    00041     DeclareObjectType(FCDObject);
    00042
    00043     FUObjectContainer<FCDPlaceHolder> placeHolders;
    00044
    00045 public:
    00048     FCDExternalReferenceManager(FCDocument* document);
    00049
    00051     virtual ~FCDExternalReferenceManager();
    00052
    00055     FCDPlaceHolder* AddPlaceHolder(FCDocument* document);
    00056
    00059     FCDPlaceHolder* AddPlaceHolder(const fstring& fileUrl);
    00060
    00064     inline size_t GetPlaceHolderCount() const { return placeHolders.size(); }
    00065
    00069     inline FCDPlaceHolder* GetPlaceHolder(size_t index) { FUAssert(index < placeHolders.size(), return NULL); return placeHolders.at(index); }
    00070     inline const FCDPlaceHolder* GetPlaceHolder(size_t index) const { FUAssert(index < placeHolders.size(), return NULL); return placeHolders.at(index); }
    00077     const FCDPlaceHolder* FindPlaceHolder(const fstring& fileUrl) const;
    00078     inline FCDPlaceHolder* FindPlaceHolder(const fstring& fileUrl) { return const_cast<FCDPlaceHolder*>(const_cast<const FCDExternalReferenceManager*>(this)->FindPlaceHolder(fileUrl)); }
    00084     const FCDPlaceHolder* FindPlaceHolder(const FCDocument* document) const;
    00085     inline FCDPlaceHolder* FindPlaceHolder(FCDocument* document)  { return const_cast<FCDPlaceHolder*>(const_cast<const FCDExternalReferenceManager*>(this)->FindPlaceHolder(document)); }
    00093     static void RegisterLoadedDocument(FCDocument* document);
    00094 };
    00095
    00096 #endif // _FCD_EXTERNAL_REFERENCE_MANAGER_H_