2001-03-02 00:47:05 +03:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
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() {}
|
2001-03-15 18:42:43 +03:00
|
|
|
virtual ~cmCablePackageCommand();
|
2001-03-02 00:47:05 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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);
|
|
|
|
|
2001-03-09 00:13:27 +03:00
|
|
|
/**
|
|
|
|
* This is called at the end after all the information
|
|
|
|
* specified by the command is accumulated. Most commands do
|
|
|
|
* not implement this method. At this point, reading and
|
|
|
|
* writing to the cache can be done.
|
|
|
|
*/
|
|
|
|
virtual void FinalPass();
|
|
|
|
|
2001-03-02 00:47:05 +03:00
|
|
|
/**
|
|
|
|
* 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
|
2001-04-11 22:59:02 +04:00
|
|
|
"CABLE_PACKAGE(package_name target)\n"
|
2001-03-02 00:47:05 +03:00
|
|
|
"Close current package (if any), and open a new package definition.";
|
|
|
|
}
|
|
|
|
|
|
|
|
void WritePackageHeader() const;
|
|
|
|
void WritePackageFooter() const;
|
2001-04-11 22:59:02 +04:00
|
|
|
const char *GetPackageName() {return m_PackageName.c_str();}
|
|
|
|
|
2001-03-02 00:47:05 +03:00
|
|
|
cmTypeMacro(cmCablePackageCommand, cmCableCommand);
|
|
|
|
private:
|
|
|
|
/**
|
|
|
|
* The name of the package.
|
|
|
|
*/
|
|
|
|
std::string m_PackageName;
|
2001-04-11 22:59:02 +04:00
|
|
|
std::string m_TargetName;
|
2001-03-02 00:47:05 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|