[Cmake-commits] [cmake-commits] king committed cmGlobalXCodeGenerator.cxx 1.220 1.221

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jul 29 16:39:48 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv2641/Source

Modified Files:
	cmGlobalXCodeGenerator.cxx 
Log Message:
Re-order cmGlobalXCodeGenerator implementation

This defines class cmGlobalXCodeGenerator::BuildObjectListOrString early
in the source file so it can be used in more places.


Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.220
retrieving revision 1.221
diff -C 2 -d -r1.220 -r1.221
*** cmGlobalXCodeGenerator.cxx	24 Jul 2009 19:58:22 -0000	1.220
--- cmGlobalXCodeGenerator.cxx	29 Jul 2009 20:39:45 -0000	1.221
***************
*** 63,66 ****
--- 63,117 ----
  #endif
  
+ // Builds either an object list or a space-separated string from the
+ // given inputs.
+ class cmGlobalXCodeGenerator::BuildObjectListOrString
+ {
+   cmGlobalXCodeGenerator *Generator;
+   cmXCodeObject *Group;
+   bool Empty;
+   std::string String;
+ 
+ public:
+   BuildObjectListOrString(cmGlobalXCodeGenerator *gen, bool buildObjectList)
+     : Generator(gen), Group(0), Empty(true)
+     {
+     if (buildObjectList)
+       {
+       this->Group = this->Generator->CreateObject(cmXCodeObject::OBJECT_LIST);
+       }
+     }
+ 
+   bool IsEmpty() const { return this->Empty; }
+ 
+   void Add(const char *newString)
+     {
+     this->Empty = false;
+ 
+     if (this->Group)
+       {
+       this->Group->AddObject(this->Generator->CreateString(newString));
+       }
+     else
+       {
+       this->String += newString;
+       this->String += ' ';
+       }
+     }
+ 
+   const std::string &GetString() const { return this->String; }
+ 
+   cmXCodeObject *CreateList()
+     {
+     if (this->Group)
+       {
+       return this->Group;
+       }
+     else
+       {
+       return this->Generator->CreateString(this->String.c_str());
+       }
+     }
+ };
+ 
  //----------------------------------------------------------------------------
  cmGlobalXCodeGenerator::cmGlobalXCodeGenerator()
***************
*** 453,507 ****
  }
  
- // Builds either an object list or a space-separated string from the
- // given inputs.
- class cmGlobalXCodeGenerator::BuildObjectListOrString
- {
-   cmGlobalXCodeGenerator *Generator;
-   cmXCodeObject *Group;
-   bool Empty;
-   std::string String;
- 
- public:
-   BuildObjectListOrString(cmGlobalXCodeGenerator *gen, bool buildObjectList)
-     : Generator(gen), Group(0), Empty(true)
-     {
-     if (buildObjectList)
-       {
-       this->Group = this->Generator->CreateObject(cmXCodeObject::OBJECT_LIST);
-       }
-     }
- 
-   bool IsEmpty() const { return this->Empty; }
- 
-   void Add(const char *newString)
-     {
-     this->Empty = false;
- 
-     if (this->Group)
-       {
-       this->Group->AddObject(this->Generator->CreateString(newString));
-       }
-     else
-       {
-       this->String += newString;
-       this->String += ' ';
-       }
-     }
- 
-   const std::string &GetString() const { return this->String; }
- 
-   cmXCodeObject *CreateList()
-     {
-     if (this->Group)
-       {
-       return this->Group;
-       }
-     else
-       {
-       return this->Generator->CreateString(this->String.c_str());
-       }
-     }
- };
- 
  //----------------------------------------------------------------------------
  cmXCodeObject*
--- 504,507 ----



More information about the Cmake-commits mailing list