| 1 | /**************************************************************************************** |
| 2 | |
| 3 | Copyright (C) 2015 Autodesk, Inc. |
| 4 | All rights reserved. |
| 5 | |
| 6 | Use of this software is subject to the terms of the Autodesk license agreement |
| 7 | provided at the time of installation or download, or which otherwise accompanies |
| 8 | this software in either electronic or hard copy form. |
| 9 | |
| 10 | ****************************************************************************************/ |
| 11 | |
| 12 | //! \file fbxcontainertemplate.h |
| 13 | #ifndef _FBXSDK_SCENE_CONTAINER_TEMPLATE_H_ |
| 14 | #define _FBXSDK_SCENE_CONTAINER_TEMPLATE_H_ |
| 15 | |
| 16 | #include <fbxsdk/fbxsdk_def.h> |
| 17 | |
| 18 | #include <fbxsdk/core/fbxobject.h> |
| 19 | |
| 20 | #include <fbxsdk/fbxsdk_nsbegin.h> |
| 21 | |
| 22 | //Container Template tokens |
| 23 | #define FBXSDK_CONTAINER_TEMPLATE_STR "templates" |
| 24 | #define FBXSDK_TEMPLATE_STR "template" |
| 25 | #define FBXSDK_EXTENDS_TEMPLATE_STR "extends" |
| 26 | |
| 27 | struct FbxContainerTemplate_internal; |
| 28 | |
| 29 | /** Class for Container Template files. |
| 30 | * \nosubgrouping |
| 31 | */ |
| 32 | class FBXSDK_DLL FbxContainerTemplate : public FbxObject |
| 33 | { |
| 34 | FBXSDK_OBJECT_DECLARE(FbxContainerTemplate, FbxObject); |
| 35 | |
| 36 | public: |
| 37 | /** Parse template file to get extend templates. |
| 38 | * \param pTemplateFilePath The template file to be parsed. |
| 39 | * \param pExtendTemplateNames Fill extend templates' names to this array. |
| 40 | * \remark Call this function to get extend templates' names. |
| 41 | */ |
| 42 | void ParseTemplateFile(const char* pTemplateFilePath, FbxArray<FbxString*>& pExtendTemplateNames); |
| 43 | |
| 44 | /** Add extend template path. |
| 45 | * \param pExtendTemplatePath The template file path to be added. |
| 46 | */ |
| 47 | void AddExtendTemplatePath(const char* pExtendTemplatePath); |
| 48 | |
| 49 | /** Get the (pIndex)th extend template path. |
| 50 | * \param pIndex Index of the queried item. |
| 51 | * \return The (pIndex)th extend template path. |
| 52 | */ |
| 53 | char* GetExtendTemplatePathAt(FbxUInt pIndex) const; |
| 54 | |
| 55 | /** Get the count of extend template path. |
| 56 | * \return The count of extend template path. |
| 57 | */ |
| 58 | FbxUInt GetExtendTemplateCount() const; |
| 59 | |
| 60 | /** Clear the extend template path. |
| 61 | */ |
| 62 | void ClearExtendTemplatePath(); |
| 63 | |
| 64 | /** This property contains the template name. |
| 65 | * |
| 66 | * To access this property do: TemplateName.Get(). |
| 67 | * To set this property do: TemplateName.Set(FbxString). |
| 68 | * |
| 69 | * Default value is "". |
| 70 | */ |
| 71 | FbxPropertyT<FbxString> ContainerTemplateName; |
| 72 | |
| 73 | /** This property contains the template path. |
| 74 | * |
| 75 | * To access this property do: TemplatePath.Get(). |
| 76 | * To set this property do: TemplatePath.Set(FbxString). |
| 77 | * |
| 78 | * Default value is "". |
| 79 | */ |
| 80 | FbxPropertyT<FbxString> ContainerTemplatePath; |
| 81 | |
| 82 | /** This property contains the template package name. |
| 83 | * |
| 84 | * To access this property do: TemplatePackageName.Get(). |
| 85 | * To set this property do: TemplatePackageName.Set(FbxString). |
| 86 | * |
| 87 | * Default value is "". |
| 88 | */ |
| 89 | FbxPropertyT<FbxString> ContainerTemplatePackageName; |
| 90 | |
| 91 | /** This property contains the template version information of the container |
| 92 | * |
| 93 | * To access this property do: TemplateVersion.Get(). |
| 94 | * To set this property do: TemplateVersion.Set(FbxString). |
| 95 | * |
| 96 | * Default value is "". |
| 97 | */ |
| 98 | FbxPropertyT<FbxString> ContainerTemplateVersion; |
| 99 | |
| 100 | /***************************************************************************************************************************** |
| 101 | ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! ** |
| 102 | *****************************************************************************************************************************/ |
| 103 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 104 | protected: |
| 105 | virtual void Construct(const FbxObject* pFrom); |
| 106 | virtual void ConstructProperties(bool pForceSet); |
| 107 | virtual void Destruct(bool pRecursive); |
| 108 | |
| 109 | private: |
| 110 | FbxContainerTemplate_internal* mData; |
| 111 | FbxArray<FbxString*> mExtendTemplatePaths; |
| 112 | #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/ |
| 113 | }; |
| 114 | |
| 115 | #include <fbxsdk/fbxsdk_nsend.h> |
| 116 | |
| 117 | #endif /* _FBXSDK_SCENE_CONTAINER_TEMPLATE_H_ */ |
| 118 | |