diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-01-21 21:25:36 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-01-21 21:25:36 (GMT) |
commit | 2f631642ca2e91d0ba6e4beabfc5f74754ab5ad9 (patch) | |
tree | 1d28be2ba8a7f1a50c0463af88e32d7791b73297 /Source/cmXCodeObject.h | |
parent | 13865fc4fae3806c1359e17e60b7032edc379026 (diff) | |
download | CMake-2f631642ca2e91d0ba6e4beabfc5f74754ab5ad9.zip CMake-2f631642ca2e91d0ba6e4beabfc5f74754ab5ad9.tar.gz CMake-2f631642ca2e91d0ba6e4beabfc5f74754ab5ad9.tar.bz2 |
ENH: start xcode stuff
Diffstat (limited to 'Source/cmXCodeObject.h')
-rw-r--r-- | Source/cmXCodeObject.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h new file mode 100644 index 0000000..0dc6790 --- /dev/null +++ b/Source/cmXCodeObject.h @@ -0,0 +1,49 @@ +#include "cmStandardIncludes.h" + +class cmXCodeObject +{ +public: + enum Type { OBJECT_LIST, ATTRIBUTE_GROUP, OBJECT_REF, OBJECT }; + enum PBXType { PBXGroup, PBXBuildStyle, PBXProject, PBXHeadersBuildPhase, + PBXSourcesBuildPhase, PBXFrameworksBuildPhase, PBXNativeTarget, + PBXFileReference, PBXBuildFile, PBXContainerItemProxy, PBXTargetDependency, + PBXShellScriptBuildPhase, PBXResourcesBuildPhase, PBXApplicationReference, + PBXExecutableFileReference, PBXLibraryReference, PBXToolTarget, PBXLibraryTarget, + None + }; + static const char* PBXTypeNames[]; + + cmXCodeObject(PBXType ptype, Type type); + void AddAttribute(const char* name, const char* value) + { + m_StringAttributes[name] = value; + } + void AddAttribute(const char* name, cmXCodeObject* value) + { + m_ObjectAttributes[name] = value; + } + + void SetObject(cmXCodeObject* value) + { + m_Object = value; + } + void AddObject(cmXCodeObject* value) + { + m_List.push_back(value); + } + void Indent(int level, std::ostream& out); + void Print(std::ostream& out); + static void PrintAll(std::ostream& out); + const char* GetId() + { + return m_Id.c_str(); + } + Type m_Type; + cmStdString m_Id; + PBXType m_IsA; + cmXCodeObject* m_Object; + std::vector<cmXCodeObject*> m_List; + std::map<cmStdString, cmXCodeObject*> m_ObjectAttributes; + std::map<cmStdString, cmStdString> m_StringAttributes; + static std::vector<cmXCodeObject*> s_AllObjects; +}; |