ENH: Added support for element tag specification with syntax tag:element as an argument to the CABLE_DEFINE_SET command. A single colon with nothing to its left will result in an empty tag.

This commit is contained in:
Brad King
2001-03-13 18:01:49 -05:00
parent 50c9139628
commit 007f5ccd5f
2 changed files with 73 additions and 19 deletions
+7 -5
View File
@@ -69,17 +69,19 @@ public:
virtual const char* GetFullDocumentation()
{
return
"CABLE_DEFINE_SET(name_of_set member1 member2 ...)\n"
"Generates a Set definition in the CABLE configuration. Tags are\n"
"automatically generated. The sets are referenced in other CABLE\n"
"commands by a '$' immediately followed by the set name (ex. $SetName).";
"CABLE_DEFINE_SET(name_of_set [[tag1]:]memeber1 [[tag2]:]member2 ...)\n"
"Generates a Set definition in the CABLE configuration. The sets are\n"
"referenced in other CABLE commands by a '$' immediately followed by\n"
"the set name (ex. $SetName). If a the \"tag:\" syntax is not used,\n"
"an attempt is made to auto-generate a meaningful tag.\n";
}
cmTypeMacro(cmCableDefineSetCommand, cmCableCommand);
private:
void WriteConfiguration() const;
std::string GenerateTag(const std::string&) const;
bool AddElement(const std::string&);
bool GenerateTag(const std::string&, std::string&);
private:
typedef std::pair<std::string, std::string> Element;
typedef std::vector<Element> Elements;