stringapi: Miscellaneous char* parameters

This commit is contained in:
Ben Boeckel
2014-02-21 19:05:55 -05:00
committed by Brad King
parent 5af95c396d
commit b3bf31a548
49 changed files with 173 additions and 175 deletions

View File

@@ -38,12 +38,12 @@ public:
PBXType GetIsA() { return this->IsA;}
void SetString(const std::string& s);
const char* GetString()
const std::string& GetString()
{
return this->String.c_str();
return this->String;
}
void AddAttribute(const char* name, cmXCodeObject* value)
void AddAttribute(const std::string& name, cmXCodeObject* value)
{
this->ObjectAttributes[name] = value;
}
@@ -79,11 +79,11 @@ public:
static void PrintList(std::vector<cmXCodeObject*> const&,
std::ostream& out);
const char* GetId()
const std::string& GetId()
{
return this->Id.c_str();
return this->Id;
}
void SetId(const char* id)
void SetId(const std::string& id)
{
this->Id = id;
}
@@ -95,8 +95,8 @@ public:
{
this->Target = t;
}
const char* GetComment() {return this->Comment.c_str();}
bool HasComment() { return (this->Comment.size() != 0);}
const std::string& GetComment() {return this->Comment;}
bool HasComment() { return (!this->Comment.empty());}
cmXCodeObject* GetObject(const char* name)
{
if(this->ObjectAttributes.count(name))
@@ -141,7 +141,7 @@ public:
return this->DependTargets;
}
std::vector<cmXCodeObject*> const& GetObjectList() { return this->List;}
void SetComment(const char* c) { this->Comment = c;}
void SetComment(const std::string& c) { this->Comment = c;}
static void PrintString(std::ostream& os,std::string String);
protected:
void PrintString(std::ostream& os) const;