2005-01-25 01:35:54 +03:00
|
|
|
#ifndef cmXCodeObject_h
|
|
|
|
#define cmXCodeObject_h
|
|
|
|
|
2005-01-22 00:25:36 +03:00
|
|
|
#include "cmStandardIncludes.h"
|
|
|
|
|
|
|
|
class cmXCodeObject
|
|
|
|
{
|
|
|
|
public:
|
2005-01-25 23:26:57 +03:00
|
|
|
enum Type { OBJECT_LIST, STRING, ATTRIBUTE_GROUP, OBJECT_REF, OBJECT };
|
2005-01-22 00:25:36 +03:00
|
|
|
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);
|
2005-01-25 23:26:57 +03:00
|
|
|
void SetString(const char* s)
|
2005-01-22 00:25:36 +03:00
|
|
|
{
|
2005-01-25 23:26:57 +03:00
|
|
|
m_String = s;
|
2005-01-22 00:25:36 +03:00
|
|
|
}
|
2005-01-25 23:26:57 +03:00
|
|
|
|
2005-01-22 00:25:36 +03:00
|
|
|
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);
|
|
|
|
}
|
2005-01-25 01:35:54 +03:00
|
|
|
static void Indent(int level, std::ostream& out);
|
2005-01-22 00:25:36 +03:00
|
|
|
void Print(std::ostream& out);
|
2005-01-25 01:35:54 +03:00
|
|
|
static void PrintList(std::vector<cmXCodeObject*> const&, std::ostream& out);
|
2005-01-22 00:25:36 +03:00
|
|
|
const char* GetId()
|
|
|
|
{
|
|
|
|
return m_Id.c_str();
|
|
|
|
}
|
2005-01-25 01:35:54 +03:00
|
|
|
private:
|
2005-01-22 00:25:36 +03:00
|
|
|
Type m_Type;
|
|
|
|
cmStdString m_Id;
|
|
|
|
PBXType m_IsA;
|
2005-01-25 23:26:57 +03:00
|
|
|
cmStdString m_String;
|
2005-01-22 00:25:36 +03:00
|
|
|
cmXCodeObject* m_Object;
|
|
|
|
std::vector<cmXCodeObject*> m_List;
|
|
|
|
std::map<cmStdString, cmXCodeObject*> m_ObjectAttributes;
|
|
|
|
};
|
2005-01-25 01:35:54 +03:00
|
|
|
#endif
|