summaryrefslogtreecommitdiffstats
path: root/Source/cmXCodeObject.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-01-25 20:26:57 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-01-25 20:26:57 (GMT)
commit96daa417cb8ee1dffd3f5e17e7b3c76df31d5b73 (patch)
tree4fd722a406a18346ac4bb90e9fb66b1e7503357c /Source/cmXCodeObject.cxx
parente07af61e51618d60a32aedb268fdc0854624f0dd (diff)
downloadCMake-96daa417cb8ee1dffd3f5e17e7b3c76df31d5b73.zip
CMake-96daa417cb8ee1dffd3f5e17e7b3c76df31d5b73.tar.gz
CMake-96daa417cb8ee1dffd3f5e17e7b3c76df31d5b73.tar.bz2
ENH: add initial non-working XCode stuff
Diffstat (limited to 'Source/cmXCodeObject.cxx')
-rw-r--r--Source/cmXCodeObject.cxx29
1 files changed, 15 insertions, 14 deletions
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 9104ca4..dbdbb03 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -18,7 +18,7 @@ cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
m_Type = type;
if(m_Type == OBJECT)
{
- this->AddAttribute("isa", PBXTypeNames[m_IsA]);
+ this->AddAttribute("isa", 0);
}
}
@@ -40,10 +40,15 @@ void cmXCodeObject::Print(std::ostream& out)
std::map<cmStdString, cmXCodeObject*>::iterator i;
for(i = m_ObjectAttributes.begin(); i != m_ObjectAttributes.end(); ++i)
{
+
cmXCodeObject* object = i->second;
- if(object->m_Type == OBJECT_LIST)
+ cmXCodeObject::Indent(3, out);
+ if(i->first == "isa")
+ {
+ out << i->first << " = " << PBXTypeNames[m_IsA] << ";\n";
+ }
+ else if(object->m_Type == OBJECT_LIST)
{
- cmXCodeObject::Indent(3, out);
out << i->first << " = {\n";
for(unsigned int k = 0; k < i->second->m_List.size(); k++)
{
@@ -55,30 +60,26 @@ void cmXCodeObject::Print(std::ostream& out)
}
else if(object->m_Type == ATTRIBUTE_GROUP)
{
- std::map<cmStdString, cmStdString>::iterator j;
- cmXCodeObject::Indent(3, out);
+ std::map<cmStdString, cmXCodeObject*>::iterator j;
out << i->first << " = {\n";
- for(j = object->m_StringAttributes.begin(); j != object->m_StringAttributes.end(); ++j)
+ for(j = object->m_ObjectAttributes.begin(); j != object->m_ObjectAttributes.end(); ++j)
{
cmXCodeObject::Indent(4, out);
- out << j->first << " = " << j->second << ";\n";
+ out << j->first << " = " << j->second->m_String << ";\n";
}
cmXCodeObject::Indent(3, out);
out << "}\n";
}
else if(object->m_Type == OBJECT_REF)
{
- cmXCodeObject::Indent(3, out);
out << i->first << " = " << object->m_Object->m_Id << ";\n";
}
+ else if(object->m_Type == STRING)
+ {
+ out << i->first << " = " << object->m_String << ";\n";
+ }
}
- std::map<cmStdString, cmStdString>::iterator j;
- for(j = m_StringAttributes.begin(); j != m_StringAttributes.end(); ++j)
- {
- cmXCodeObject::Indent(3, out);
- out << j->first << " = " << j->second << ";\n";
- }
cmXCodeObject::Indent(2, out);
out << "};\n";
}