summaryrefslogtreecommitdiffstats
path: root/Source/cmCablePackageCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-03-01 21:47:05 (GMT)
committerBrad King <brad.king@kitware.com>2001-03-01 21:47:05 (GMT)
commitdc72655414eb8a611524b6480dad92d46b08fecb (patch)
treeeae01169b53d5e67156e5562ed53b4e447947658 /Source/cmCablePackageCommand.h
parentaf30fe67458fd26054696ce018f7ae6faaebcca4 (diff)
downloadCMake-dc72655414eb8a611524b6480dad92d46b08fecb.zip
CMake-dc72655414eb8a611524b6480dad92d46b08fecb.tar.gz
CMake-dc72655414eb8a611524b6480dad92d46b08fecb.tar.bz2
ENH: Change to new CABLE command architecture. CABLE configuration code is now generated on the first pass, during the Invoke() calls.
Diffstat (limited to 'Source/cmCablePackageCommand.h')
-rw-r--r--Source/cmCablePackageCommand.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/Source/cmCablePackageCommand.h b/Source/cmCablePackageCommand.h
new file mode 100644
index 0000000..8546556
--- /dev/null
+++ b/Source/cmCablePackageCommand.h
@@ -0,0 +1,85 @@
+/*=========================================================================
+
+ Program: Insight Segmentation & Registration Toolkit
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+
+ Copyright (c) 2000 National Library of Medicine
+ All rights reserved.
+
+ See COPYRIGHT.txt for copyright details.
+
+=========================================================================*/
+#ifndef cmCablePackageCommand_h
+#define cmCablePackageCommand_h
+
+#include "cmStandardIncludes.h"
+#include "cmCableCommand.h"
+
+/** \class cmCablePackageCommand
+ * \brief Define a command that begins a CABLE Package definition.
+ *
+ * cmCablePackageCommand is used to generate a new CABLE Package.
+ * All subsequent commands that require a package will refer to that
+ * setup by this command, until another package is started.
+ */
+class cmCablePackageCommand : public cmCableCommand
+{
+public:
+ cmCablePackageCommand() {}
+ virtual ~cmCablePackageCommand() {}
+
+ /**
+ * This is a virtual constructor for the command.
+ */
+ virtual cmCommand* Clone()
+ {
+ return new cmCablePackageCommand;
+ }
+
+ /**
+ * This is called when the command is first encountered in
+ * the CMakeLists.txt file.
+ */
+ virtual bool Invoke(std::vector<std::string>& args);
+
+ /**
+ * The name of the command as specified in CMakeList.txt.
+ */
+ virtual const char* GetName() { return "CABLE_PACKAGE";}
+
+ /**
+ * Succinct documentation.
+ */
+ virtual const char* GetTerseDocumentation()
+ {
+ return "Begin a package definition.";
+ }
+
+ /**
+ * More documentation.
+ */
+ virtual const char* GetFullDocumentation()
+ {
+ return
+ "CABLE_PACKAGE(package_name)\n"
+ "Close current package (if any), and open a new package definition.";
+ }
+
+ void WritePackageHeader() const;
+ void WritePackageFooter() const;
+
+ cmTypeMacro(cmCablePackageCommand, cmCableCommand);
+private:
+ /**
+ * The name of the package.
+ */
+ std::string m_PackageName;
+};
+
+
+
+#endif