ENH: CABIL -> CABLE rename.
This commit is contained in:
parent
e5e2a57bfb
commit
d0a8794746
|
@ -13,58 +13,58 @@
|
||||||
See COPYRIGHT.txt for copyright details.
|
See COPYRIGHT.txt for copyright details.
|
||||||
|
|
||||||
=========================================================================*/
|
=========================================================================*/
|
||||||
#include "cmCabilCommand.h"
|
#include "cmCableCommand.h"
|
||||||
#include "cmCacheManager.h"
|
#include "cmCacheManager.h"
|
||||||
|
|
||||||
// cmCabilCommand
|
// cmCableCommand
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor initializes to empty m_CabilData.
|
* Constructor initializes to empty m_CableData.
|
||||||
*/
|
*/
|
||||||
cmCabilCommand::cmCabilCommand(): m_CabilData(0)
|
cmCableCommand::cmCableCommand(): m_CableData(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor frees the cmCabilData only if this command is its owner.
|
* Destructor frees the cmCableData only if this command is its owner.
|
||||||
*/
|
*/
|
||||||
cmCabilCommand::~cmCabilCommand()
|
cmCableCommand::~cmCableCommand()
|
||||||
{
|
{
|
||||||
if(m_CabilData && m_CabilData->OwnerIs(this))
|
if(m_CableData && m_CableData->OwnerIs(this))
|
||||||
{
|
{
|
||||||
delete m_CabilData;
|
delete m_CableData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write a CABIL configuration file header.
|
* Write a CABLE configuration file header.
|
||||||
*/
|
*/
|
||||||
void cmCabilCommand::WriteConfigurationHeader(std::ostream& os) const
|
void cmCableCommand::WriteConfigurationHeader(std::ostream& os) const
|
||||||
{
|
{
|
||||||
os << "<?xml version=\"1.0\"?>" << std::endl
|
os << "<?xml version=\"1.0\"?>" << std::endl
|
||||||
<< "<CabilConfiguration>" << std::endl;
|
<< "<CableConfiguration>" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write a CABIL configuration file footer.
|
* Write a CABLE configuration file footer.
|
||||||
*/
|
*/
|
||||||
void cmCabilCommand::WriteConfigurationFooter(std::ostream& os) const
|
void cmCableCommand::WriteConfigurationFooter(std::ostream& os) const
|
||||||
{
|
{
|
||||||
os << "</CabilConfiguration>" << std::endl;
|
os << "</CableConfiguration>" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensure that this cmCabilCommand has a valid m_CabilData pointer.
|
* Ensure that this cmCableCommand has a valid m_CableData pointer.
|
||||||
*/
|
*/
|
||||||
void cmCabilCommand::SetupCabilData()
|
void cmCableCommand::SetupCableData()
|
||||||
{
|
{
|
||||||
// Only do something if the pointer is invalid.
|
// Only do something if the pointer is invalid.
|
||||||
if(m_CabilData)
|
if(m_CableData)
|
||||||
{ return; }
|
{ return; }
|
||||||
|
|
||||||
// Look through the vector of commands from the makefile.
|
// Look through the vector of commands from the makefile.
|
||||||
|
@ -73,19 +73,19 @@ void cmCabilCommand::SetupCabilData()
|
||||||
for(std::vector<cmCommand*>::const_iterator commandIter =
|
for(std::vector<cmCommand*>::const_iterator commandIter =
|
||||||
usedCommands.begin(); commandIter != usedCommands.end(); ++commandIter)
|
usedCommands.begin(); commandIter != usedCommands.end(); ++commandIter)
|
||||||
{
|
{
|
||||||
// If this command is a cmCabilCommand, see if it has a cmCabilData
|
// If this command is a cmCableCommand, see if it has a cmCableData
|
||||||
// instance.
|
// instance.
|
||||||
cmCabilCommand* command = cmCabilCommand::SafeDownCast(*commandIter);
|
cmCableCommand* command = cmCableCommand::SafeDownCast(*commandIter);
|
||||||
if(command)
|
if(command)
|
||||||
{ m_CabilData = command->m_CabilData; }
|
{ m_CableData = command->m_CableData; }
|
||||||
|
|
||||||
// If we found an instance of cmCabilData, then we are done.
|
// If we found an instance of cmCableData, then we are done.
|
||||||
if(m_CabilData)
|
if(m_CableData)
|
||||||
{ return; }
|
{ return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
// We didn't find another cmCabilCommand with a valid cmCabilData.
|
// We didn't find another cmCableCommand with a valid cmCableData.
|
||||||
// We must allocate the new cmCabilData ourselves, and with this
|
// We must allocate the new cmCableData ourselves, and with this
|
||||||
// command as its owner.
|
// command as its owner.
|
||||||
m_CabilData = new cmCabilData(this);
|
m_CableData = new cmCableData(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,42 +13,42 @@
|
||||||
See COPYRIGHT.txt for copyright details.
|
See COPYRIGHT.txt for copyright details.
|
||||||
|
|
||||||
=========================================================================*/
|
=========================================================================*/
|
||||||
#ifndef cmCabilCommand_h
|
#ifndef cmCableCommand_h
|
||||||
#define cmCabilCommand_h
|
#define cmCableCommand_h
|
||||||
|
|
||||||
#include "cmStandardIncludes.h"
|
#include "cmStandardIncludes.h"
|
||||||
#include "cmCommand.h"
|
#include "cmCommand.h"
|
||||||
#include "cmCabilData.h"
|
#include "cmCableData.h"
|
||||||
|
|
||||||
/** \class cmCabilCommand
|
/** \class cmCableCommand
|
||||||
* \brief Superclass for all cmCabil command classes.
|
* \brief Superclass for all cmCable command classes.
|
||||||
*
|
*
|
||||||
* cmCabilCommand is the superclass for all CABIL-related commands.
|
* cmCableCommand is the superclass for all CABLE-related commands.
|
||||||
* The C++ Automated Bindings for Interpreted Languages (CABIL,
|
* The C++ Automated Bindings for Language Extension (CABLE) tool is
|
||||||
* pronounced "sawbill") tool is configured using an XML input file.
|
* configured using an XML input file. The input format is quite
|
||||||
* The input format is quite flexible, but XML is hard for humans to
|
* flexible, but XML is hard for humans to write by hand. The CABLE
|
||||||
* write by hand. The CABIL commands in CMake are designed to simplify
|
* commands in CMake are designed to simplify the interface with only
|
||||||
* the interface with only a small loss in functionality. These commands
|
* a small loss in functionality. These commands can be used to
|
||||||
* can be used to automatically generate CABIL configuration files.
|
* automatically generate CABLE configuration files.
|
||||||
*/
|
*/
|
||||||
class cmCabilCommand : public cmCommand
|
class cmCableCommand : public cmCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmCabilCommand();
|
cmCableCommand();
|
||||||
virtual ~cmCabilCommand();
|
virtual ~cmCableCommand();
|
||||||
|
|
||||||
void WriteConfigurationHeader(std::ostream&) const;
|
void WriteConfigurationHeader(std::ostream&) const;
|
||||||
void WriteConfigurationFooter(std::ostream&) const;
|
void WriteConfigurationFooter(std::ostream&) const;
|
||||||
|
|
||||||
cmTypeMacro(cmCabilCommand, cmCommand);
|
cmTypeMacro(cmCableCommand, cmCommand);
|
||||||
protected:
|
protected:
|
||||||
void SetupCabilData();
|
void SetupCableData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cmCabilData holding common information for all cmCabilCommand
|
* The cmCableData holding common information for all cmCableCommand
|
||||||
* instances.
|
* instances.
|
||||||
*/
|
*/
|
||||||
cmCabilData* m_CabilData;
|
cmCableData* m_CableData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,14 +13,14 @@
|
||||||
See COPYRIGHT.txt for copyright details.
|
See COPYRIGHT.txt for copyright details.
|
||||||
|
|
||||||
=========================================================================*/
|
=========================================================================*/
|
||||||
#include "cmCabilData.h"
|
#include "cmCableData.h"
|
||||||
#include "cmCacheManager.h"
|
#include "cmCacheManager.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free all data that was stored here.
|
* Free all data that was stored here.
|
||||||
*/
|
*/
|
||||||
cmCabilData::~cmCabilData()
|
cmCableData::~cmCableData()
|
||||||
{
|
{
|
||||||
for(OutputFiles::iterator i = m_OutputFiles.begin();
|
for(OutputFiles::iterator i = m_OutputFiles.begin();
|
||||||
i != m_OutputFiles.end(); ++i)
|
i != m_OutputFiles.end(); ++i)
|
||||||
|
@ -33,8 +33,8 @@ cmCabilData::~cmCabilData()
|
||||||
/**
|
/**
|
||||||
* The constructor attempts to open the file for writing.
|
* The constructor attempts to open the file for writing.
|
||||||
*/
|
*/
|
||||||
cmCabilData::OutputFile
|
cmCableData::OutputFile
|
||||||
::OutputFile(std::string file, const cmCabilCommand* command):
|
::OutputFile(std::string file, const cmCableCommand* command):
|
||||||
m_FileStream(file.c_str()),
|
m_FileStream(file.c_str()),
|
||||||
m_FirstReferencingCommand(command),
|
m_FirstReferencingCommand(command),
|
||||||
m_LastReferencingCommand(command)
|
m_LastReferencingCommand(command)
|
||||||
|
@ -49,7 +49,7 @@ cmCabilData::OutputFile
|
||||||
/**
|
/**
|
||||||
* Destructor closes the file, if it was open.
|
* Destructor closes the file, if it was open.
|
||||||
*/
|
*/
|
||||||
cmCabilData::OutputFile
|
cmCableData::OutputFile
|
||||||
::~OutputFile()
|
::~OutputFile()
|
||||||
{
|
{
|
||||||
if(m_FileStream)
|
if(m_FileStream)
|
||||||
|
@ -61,7 +61,7 @@ cmCabilData::OutputFile
|
||||||
* Get the output stream associated with this OutputFile.
|
* Get the output stream associated with this OutputFile.
|
||||||
*/
|
*/
|
||||||
std::ostream&
|
std::ostream&
|
||||||
cmCabilData::OutputFile
|
cmCableData::OutputFile
|
||||||
::GetStream()
|
::GetStream()
|
||||||
{
|
{
|
||||||
return m_FileStream;
|
return m_FileStream;
|
||||||
|
@ -69,24 +69,24 @@ cmCabilData::OutputFile
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cmCabilData::OutputFile
|
cmCableData::OutputFile
|
||||||
::SetLastReferencingCommand(const cmCabilCommand* command)
|
::SetLastReferencingCommand(const cmCableCommand* command)
|
||||||
{
|
{
|
||||||
m_LastReferencingCommand = command;
|
m_LastReferencingCommand = command;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cmCabilData::OutputFile
|
cmCableData::OutputFile
|
||||||
::FirstReferencingCommandIs(const cmCabilCommand* command) const
|
::FirstReferencingCommandIs(const cmCableCommand* command) const
|
||||||
{
|
{
|
||||||
return (m_FirstReferencingCommand == command);
|
return (m_FirstReferencingCommand == command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cmCabilData::OutputFile
|
cmCableData::OutputFile
|
||||||
::LastReferencingCommandIs(const cmCabilCommand* command) const
|
::LastReferencingCommandIs(const cmCableCommand* command) const
|
||||||
{
|
{
|
||||||
return (m_LastReferencingCommand == command);
|
return (m_LastReferencingCommand == command);
|
||||||
}
|
}
|
||||||
|
@ -96,9 +96,9 @@ cmCabilData::OutputFile
|
||||||
* Get the OutputFile for the file with the given name. Automatically
|
* Get the OutputFile for the file with the given name. Automatically
|
||||||
* maintains first and last referencing commands.
|
* maintains first and last referencing commands.
|
||||||
*/
|
*/
|
||||||
cmCabilData::OutputFile*
|
cmCableData::OutputFile*
|
||||||
cmCabilData::GetOutputFile(const std::string& name,
|
cmCableData::GetOutputFile(const std::string& name,
|
||||||
const cmCabilCommand* command)
|
const cmCableCommand* command)
|
||||||
{
|
{
|
||||||
OutputFiles::iterator f = m_OutputFiles.find(name);
|
OutputFiles::iterator f = m_OutputFiles.find(name);
|
||||||
// If the file hasn't yet been opened, create an entry for it.
|
// If the file hasn't yet been opened, create an entry for it.
|
||||||
|
|
|
@ -13,33 +13,33 @@
|
||||||
See COPYRIGHT.txt for copyright details.
|
See COPYRIGHT.txt for copyright details.
|
||||||
|
|
||||||
=========================================================================*/
|
=========================================================================*/
|
||||||
#ifndef cmCabilData_h
|
#ifndef cmCableData_h
|
||||||
#define cmCabilData_h
|
#define cmCableData_h
|
||||||
|
|
||||||
#include "cmStandardIncludes.h"
|
#include "cmStandardIncludes.h"
|
||||||
#include "cmCommand.h"
|
#include "cmCommand.h"
|
||||||
|
|
||||||
class cmCabilCommand;
|
class cmCableCommand;
|
||||||
|
|
||||||
/** \class cmCabilData
|
/** \class cmCableData
|
||||||
* \brief Hold data in one location for all cmCabilCommand subclasses.
|
* \brief Hold data in one location for all cmCableCommand subclasses.
|
||||||
*/
|
*/
|
||||||
class cmCabilData
|
class cmCableData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The cmCabilData instance is owned by one cmCabilCommand, which is given
|
* The cmCableData instance is owned by one cmCableCommand, which is given
|
||||||
* to this constructor.
|
* to this constructor.
|
||||||
*/
|
*/
|
||||||
cmCabilData(const cmCabilCommand* owner): m_Owner(owner) {}
|
cmCableData(const cmCableCommand* owner): m_Owner(owner) {}
|
||||||
|
|
||||||
~cmCabilData();
|
~cmCableData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the given cmCabilCommand is the owner of this
|
* Returns true if the given cmCableCommand is the owner of this
|
||||||
* cmCabilData.
|
* cmCableData.
|
||||||
*/
|
*/
|
||||||
bool OwnerIs(const cmCabilCommand* owner) const
|
bool OwnerIs(const cmCableCommand* owner) const
|
||||||
{ return (owner == m_Owner); }
|
{ return (owner == m_Owner); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,27 +50,27 @@ public:
|
||||||
class OutputFile
|
class OutputFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
OutputFile(std::string, const cmCabilCommand*);
|
OutputFile(std::string, const cmCableCommand*);
|
||||||
~OutputFile();
|
~OutputFile();
|
||||||
std::ostream& GetStream();
|
std::ostream& GetStream();
|
||||||
void SetLastReferencingCommand(const cmCabilCommand*);
|
void SetLastReferencingCommand(const cmCableCommand*);
|
||||||
bool FirstReferencingCommandIs(const cmCabilCommand*) const;
|
bool FirstReferencingCommandIs(const cmCableCommand*) const;
|
||||||
bool LastReferencingCommandIs(const cmCabilCommand*) const;
|
bool LastReferencingCommandIs(const cmCableCommand*) const;
|
||||||
private:
|
private:
|
||||||
std::ofstream m_FileStream;
|
std::ofstream m_FileStream;
|
||||||
const cmCabilCommand* m_FirstReferencingCommand;
|
const cmCableCommand* m_FirstReferencingCommand;
|
||||||
const cmCabilCommand* m_LastReferencingCommand;
|
const cmCableCommand* m_LastReferencingCommand;
|
||||||
};
|
};
|
||||||
|
|
||||||
OutputFile* GetOutputFile(const std::string&, const cmCabilCommand*);
|
OutputFile* GetOutputFile(const std::string&, const cmCableCommand*);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::map<std::string, OutputFile*> OutputFiles;
|
typedef std::map<std::string, OutputFile*> OutputFiles;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cmCabilCommand which created this instance of cmCabilCommand.
|
* The cmCableCommand which created this instance of cmCableCommand.
|
||||||
*/
|
*/
|
||||||
const cmCabilCommand* m_Owner;
|
const cmCableCommand* m_Owner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hold all output streams by file name.
|
* Hold all output streams by file name.
|
||||||
|
|
|
@ -13,14 +13,14 @@
|
||||||
See COPYRIGHT.txt for copyright details.
|
See COPYRIGHT.txt for copyright details.
|
||||||
|
|
||||||
=========================================================================*/
|
=========================================================================*/
|
||||||
#include "cmCabilDefineSetCommand.h"
|
#include "cmCableDefineSetCommand.h"
|
||||||
#include "cmCacheManager.h"
|
#include "cmCacheManager.h"
|
||||||
|
|
||||||
#include "cmRegularExpression.h"
|
#include "cmRegularExpression.h"
|
||||||
|
|
||||||
|
|
||||||
// cmCabilDefineSetCommand
|
// cmCableDefineSetCommand
|
||||||
bool cmCabilDefineSetCommand::Invoke(std::vector<std::string>& args)
|
bool cmCableDefineSetCommand::Invoke(std::vector<std::string>& args)
|
||||||
{
|
{
|
||||||
if(args.size() < 2)
|
if(args.size() < 2)
|
||||||
{
|
{
|
||||||
|
@ -44,9 +44,9 @@ bool cmCabilDefineSetCommand::Invoke(std::vector<std::string>& args)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the CABIL configuration code to define this Set.
|
* Write the CABLE configuration code to define this Set.
|
||||||
*/
|
*/
|
||||||
void cmCabilDefineSetCommand::WriteConfiguration(std::ostream& os) const
|
void cmCableDefineSetCommand::WriteConfiguration(std::ostream& os) const
|
||||||
{
|
{
|
||||||
cmRegularExpression needCdataBlock("[&<>]");
|
cmRegularExpression needCdataBlock("[&<>]");
|
||||||
|
|
||||||
|
@ -77,13 +77,13 @@ void cmCabilDefineSetCommand::WriteConfiguration(std::ostream& os) const
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given the string representing a set element, automatically generate
|
* Given the string representing a set element, automatically generate
|
||||||
* the CABIL element tag for it.
|
* the CABLE element tag for it.
|
||||||
*
|
*
|
||||||
* **This function determines how the output language of all
|
* **This function determines how the output language of all
|
||||||
* CABIL-generated wrappers will look!**
|
* CABLE-generated wrappers will look!**
|
||||||
*/
|
*/
|
||||||
std::string
|
std::string
|
||||||
cmCabilDefineSetCommand::GenerateTag(const std::string& element) const
|
cmCableDefineSetCommand::GenerateTag(const std::string& element) const
|
||||||
{
|
{
|
||||||
// Hold the regular expressions for matching against the element.
|
// Hold the regular expressions for matching against the element.
|
||||||
cmRegularExpression regex;
|
cmRegularExpression regex;
|
||||||
|
|
|
@ -13,20 +13,20 @@
|
||||||
See COPYRIGHT.txt for copyright details.
|
See COPYRIGHT.txt for copyright details.
|
||||||
|
|
||||||
=========================================================================*/
|
=========================================================================*/
|
||||||
#ifndef cmCabilDefineSetCommand_h
|
#ifndef cmCableDefineSetCommand_h
|
||||||
#define cmCabilDefineSetCommand_h
|
#define cmCableDefineSetCommand_h
|
||||||
|
|
||||||
#include "cmStandardIncludes.h"
|
#include "cmStandardIncludes.h"
|
||||||
#include "cmCabilCommand.h"
|
#include "cmCableCommand.h"
|
||||||
|
|
||||||
/** \class cmCabilDefineSetCommand
|
/** \class cmCableDefineSetCommand
|
||||||
* \brief Define a command that adds a CABIL Set definition.
|
* \brief Define a command that adds a CABLE Set definition.
|
||||||
*
|
*
|
||||||
* cmCabilDefineSetCommand is used to define a named CABIL Set.
|
* cmCableDefineSetCommand is used to define a named CABLE Set.
|
||||||
* The set can be referenced in other CABIL command arguments
|
* The set can be referenced in other CABLE command arguments
|
||||||
* with a '$' followed by the set name.
|
* with a '$' followed by the set name.
|
||||||
*/
|
*/
|
||||||
class cmCabilDefineSetCommand : public cmCabilCommand
|
class cmCableDefineSetCommand : public cmCableCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
@ -34,7 +34,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual cmCommand* Clone()
|
virtual cmCommand* Clone()
|
||||||
{
|
{
|
||||||
return new cmCabilDefineSetCommand;
|
return new cmCableDefineSetCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,14 +53,14 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetName() { return "CABIL_DEFINE_SET";}
|
virtual const char* GetName() { return "CABLE_DEFINE_SET";}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Succinct documentation.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation()
|
||||||
{
|
{
|
||||||
return "Define a CABIL Set.";
|
return "Define a CABLE Set.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,15 +69,15 @@ public:
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"CABIL_DEFINE_SET(name_of_set member1 member2 ...)\n"
|
"CABLE_DEFINE_SET(name_of_set member1 member2 ...)\n"
|
||||||
"Generates a Set definition in the CABIL configuration. Tags are\n"
|
"Generates a Set definition in the CABLE configuration. Tags are\n"
|
||||||
"automatically generated. The sets are referenced in other CABIL\n"
|
"automatically generated. The sets are referenced in other CABLE\n"
|
||||||
"commands by a '$' immediately followed by the set name (ex. $SetName).";
|
"commands by a '$' immediately followed by the set name (ex. $SetName).";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void WriteConfiguration(std::ostream&) const;
|
virtual void WriteConfiguration(std::ostream&) const;
|
||||||
|
|
||||||
cmTypeMacro(cmCabilDefineSetCommand, cmCabilCommand);
|
cmTypeMacro(cmCableDefineSetCommand, cmCableCommand);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string GenerateTag(const std::string&) const;
|
std::string GenerateTag(const std::string&) const;
|
||||||
|
|
|
@ -13,17 +13,17 @@
|
||||||
See COPYRIGHT.txt for copyright details.
|
See COPYRIGHT.txt for copyright details.
|
||||||
|
|
||||||
=========================================================================*/
|
=========================================================================*/
|
||||||
#include "cmCabilInstantiateClassCommand.h"
|
#include "cmCableInstantiateClassCommand.h"
|
||||||
#include "cmCacheManager.h"
|
#include "cmCacheManager.h"
|
||||||
|
|
||||||
#include "cmRegularExpression.h"
|
#include "cmRegularExpression.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the CABIL configuration code to define this InstantiationSet.
|
* Write the CABLE configuration code to define this InstantiationSet.
|
||||||
* This includes the "class" keyword to do class template instantiations.
|
* This includes the "class" keyword to do class template instantiations.
|
||||||
*/
|
*/
|
||||||
void cmCabilInstantiateClassCommand::WriteConfiguration(std::ostream& os) const
|
void cmCableInstantiateClassCommand::WriteConfiguration(std::ostream& os) const
|
||||||
{
|
{
|
||||||
cmRegularExpression needCdataBlock("[&<>]");
|
cmRegularExpression needCdataBlock("[&<>]");
|
||||||
|
|
||||||
|
|
|
@ -13,21 +13,21 @@
|
||||||
See COPYRIGHT.txt for copyright details.
|
See COPYRIGHT.txt for copyright details.
|
||||||
|
|
||||||
=========================================================================*/
|
=========================================================================*/
|
||||||
#ifndef cmCabilInstantiateClassCommand_h
|
#ifndef cmCableInstantiateClassCommand_h
|
||||||
#define cmCabilInstantiateClassCommand_h
|
#define cmCableInstantiateClassCommand_h
|
||||||
|
|
||||||
#include "cmStandardIncludes.h"
|
#include "cmStandardIncludes.h"
|
||||||
#include "cmCabilInstantiateCommand.h"
|
#include "cmCableInstantiateCommand.h"
|
||||||
|
|
||||||
/** \class cmCabilInstantiateClassCommand
|
/** \class cmCableInstantiateClassCommand
|
||||||
* \brief Define a command that generates a rule for explicit template
|
* \brief Define a command that generates a rule for explicit template
|
||||||
* instantiations of classes.
|
* instantiations of classes.
|
||||||
*
|
*
|
||||||
* cmCabilInstantiateCommand is used to generate a rule in a CABIL
|
* cmCableInstantiateCommand is used to generate a rule in a CABLE
|
||||||
* configuration file to create explicit template instantiations of
|
* configuration file to create explicit template instantiations of
|
||||||
* classes.
|
* classes.
|
||||||
*/
|
*/
|
||||||
class cmCabilInstantiateClassCommand : public cmCabilInstantiateCommand
|
class cmCableInstantiateClassCommand : public cmCableInstantiateCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
@ -35,20 +35,20 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual cmCommand* Clone()
|
virtual cmCommand* Clone()
|
||||||
{
|
{
|
||||||
return new cmCabilInstantiateClassCommand;
|
return new cmCableInstantiateClassCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetName() { return "CABIL_INSTANTIATE_CLASS";}
|
virtual const char* GetName() { return "CABLE_INSTANTIATE_CLASS";}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Succinct documentation.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation()
|
||||||
{
|
{
|
||||||
return "Define CABIL InstantiationSet of classes.";
|
return "Define CABLE InstantiationSet of classes.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,17 +57,17 @@ public:
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"CABIL_INSTANTIATE_CLASS(cabil_config_file member1 member2 ...)\n"
|
"CABLE_INSTANTIATE_CLASS(cable_config_file member1 member2 ...)\n"
|
||||||
"Generates an InstantiationSet in the CABIL configuration. It is\n"
|
"Generates an InstantiationSet in the CABLE configuration. It is\n"
|
||||||
"assumed that all members of the set are explicit instantiations of\n"
|
"assumed that all members of the set are explicit instantiations of\n"
|
||||||
"template classes (not functions, operators, etc).";
|
"template classes (not functions, operators, etc).";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void WriteConfiguration(std::ostream&) const;
|
virtual void WriteConfiguration(std::ostream&) const;
|
||||||
|
|
||||||
cmTypeMacro(cmCabilInstantiateClassCommand, cmCabilInstantiateCommand);
|
cmTypeMacro(cmCableInstantiateClassCommand, cmCableInstantiateCommand);
|
||||||
protected:
|
protected:
|
||||||
typedef cmCabilInstantiateCommand::Elements Elements;
|
typedef cmCableInstantiateCommand::Elements Elements;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,14 +13,14 @@
|
||||||
See COPYRIGHT.txt for copyright details.
|
See COPYRIGHT.txt for copyright details.
|
||||||
|
|
||||||
=========================================================================*/
|
=========================================================================*/
|
||||||
#include "cmCabilInstantiateCommand.h"
|
#include "cmCableInstantiateCommand.h"
|
||||||
#include "cmCacheManager.h"
|
#include "cmCacheManager.h"
|
||||||
|
|
||||||
#include "cmCabilDefineSetCommand.h"
|
#include "cmCableDefineSetCommand.h"
|
||||||
#include "cmRegularExpression.h"
|
#include "cmRegularExpression.h"
|
||||||
|
|
||||||
// cmCabilInstantiateCommand
|
// cmCableInstantiateCommand
|
||||||
bool cmCabilInstantiateCommand::Invoke(std::vector<std::string>& args)
|
bool cmCableInstantiateCommand::Invoke(std::vector<std::string>& args)
|
||||||
{
|
{
|
||||||
if(args.size() < 2)
|
if(args.size() < 2)
|
||||||
{
|
{
|
||||||
|
@ -28,8 +28,8 @@ bool cmCabilInstantiateCommand::Invoke(std::vector<std::string>& args)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This command instance needs to use the cmCabilData instance.
|
// This command instance needs to use the cmCableData instance.
|
||||||
this->SetupCabilData();
|
this->SetupCableData();
|
||||||
|
|
||||||
// The output file must be opened in the output directory.
|
// The output file must be opened in the output directory.
|
||||||
std::string file = m_Makefile->GetStartOutputDirectory();
|
std::string file = m_Makefile->GetStartOutputDirectory();
|
||||||
|
@ -42,7 +42,7 @@ bool cmCabilInstantiateCommand::Invoke(std::vector<std::string>& args)
|
||||||
file += "/" + *arg++;
|
file += "/" + *arg++;
|
||||||
|
|
||||||
// Get the OutputFile corresponding to this file name.
|
// Get the OutputFile corresponding to this file name.
|
||||||
m_OutputFile = m_CabilData->GetOutputFile(file, this);
|
m_OutputFile = m_CableData->GetOutputFile(file, this);
|
||||||
|
|
||||||
// The rest of the arguments are the elements to be placed in the set.
|
// The rest of the arguments are the elements to be placed in the set.
|
||||||
for(; arg != args.end(); ++arg)
|
for(; arg != args.end(); ++arg)
|
||||||
|
@ -54,7 +54,7 @@ bool cmCabilInstantiateCommand::Invoke(std::vector<std::string>& args)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void cmCabilInstantiateCommand::FinalPass()
|
void cmCableInstantiateCommand::FinalPass()
|
||||||
{
|
{
|
||||||
// If this command is the first to reference its output file, write the
|
// If this command is the first to reference its output file, write the
|
||||||
// header information.
|
// header information.
|
||||||
|
@ -70,10 +70,10 @@ void cmCabilInstantiateCommand::FinalPass()
|
||||||
usedCommands.begin();
|
usedCommands.begin();
|
||||||
commandIter != usedCommands.end(); ++commandIter)
|
commandIter != usedCommands.end(); ++commandIter)
|
||||||
{
|
{
|
||||||
// If this command is a cmCabilDefineSetCommand, ask it to write its
|
// If this command is a cmCableDefineSetCommand, ask it to write its
|
||||||
// configuration code to the output file.
|
// configuration code to the output file.
|
||||||
cmCabilDefineSetCommand* command =
|
cmCableDefineSetCommand* command =
|
||||||
cmCabilDefineSetCommand::SafeDownCast(*commandIter);
|
cmCableDefineSetCommand::SafeDownCast(*commandIter);
|
||||||
if(command)
|
if(command)
|
||||||
{
|
{
|
||||||
command->WriteConfiguration(m_OutputFile->GetStream());
|
command->WriteConfiguration(m_OutputFile->GetStream());
|
||||||
|
@ -94,9 +94,9 @@ void cmCabilInstantiateCommand::FinalPass()
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the CABIL configuration code to define this InstantiationSet.
|
* Write the CABLE configuration code to define this InstantiationSet.
|
||||||
*/
|
*/
|
||||||
void cmCabilInstantiateCommand::WriteConfiguration(std::ostream& os) const
|
void cmCableInstantiateCommand::WriteConfiguration(std::ostream& os) const
|
||||||
{
|
{
|
||||||
cmRegularExpression needCdataBlock("[&<>]");
|
cmRegularExpression needCdataBlock("[&<>]");
|
||||||
|
|
||||||
|
|
|
@ -13,20 +13,20 @@
|
||||||
See COPYRIGHT.txt for copyright details.
|
See COPYRIGHT.txt for copyright details.
|
||||||
|
|
||||||
=========================================================================*/
|
=========================================================================*/
|
||||||
#ifndef cmCabilInstantiateCommand_h
|
#ifndef cmCableInstantiateCommand_h
|
||||||
#define cmCabilInstantiateCommand_h
|
#define cmCableInstantiateCommand_h
|
||||||
|
|
||||||
#include "cmStandardIncludes.h"
|
#include "cmStandardIncludes.h"
|
||||||
#include "cmCabilCommand.h"
|
#include "cmCableCommand.h"
|
||||||
|
|
||||||
/** \class cmCabilInstantiateCommand
|
/** \class cmCableInstantiateCommand
|
||||||
* \brief Define a command that generates a rule for explicit template
|
* \brief Define a command that generates a rule for explicit template
|
||||||
* instantiations.
|
* instantiations.
|
||||||
*
|
*
|
||||||
* cmCabilInstantiateCommand is used to generate a rule in a CABIL
|
* cmCableInstantiateCommand is used to generate a rule in a CABLE
|
||||||
* configuration file to create explicit template instantiations.
|
* configuration file to create explicit template instantiations.
|
||||||
*/
|
*/
|
||||||
class cmCabilInstantiateCommand : public cmCabilCommand
|
class cmCableInstantiateCommand : public cmCableCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
@ -34,7 +34,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual cmCommand* Clone()
|
virtual cmCommand* Clone()
|
||||||
{
|
{
|
||||||
return new cmCabilInstantiateCommand;
|
return new cmCableInstantiateCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,14 +58,14 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetName() { return "CABIL_INSTANTIATE";}
|
virtual const char* GetName() { return "CABLE_INSTANTIATE";}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Succinct documentation.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation()
|
||||||
{
|
{
|
||||||
return "Define CABIL InstantiationSet.";
|
return "Define CABLE InstantiationSet.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,22 +74,22 @@ public:
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"CABIL_INSTANTIATE(cabil_config_file member1 member2 ...)\n"
|
"CABLE_INSTANTIATE(cable_config_file member1 member2 ...)\n"
|
||||||
"Generates an InstantiationSet in the CABIL configuration. It is\n"
|
"Generates an InstantiationSet in the CABLE configuration. It is\n"
|
||||||
"assumed that all members of the set are explicit instantiations of\n"
|
"assumed that all members of the set are explicit instantiations of\n"
|
||||||
"template non-classes (functions, operators, etc).";
|
"template non-classes (functions, operators, etc).";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void WriteConfiguration(std::ostream&) const;
|
virtual void WriteConfiguration(std::ostream&) const;
|
||||||
|
|
||||||
cmTypeMacro(cmCabilInstantiateCommand, cmCabilCommand);
|
cmTypeMacro(cmCableInstantiateCommand, cmCableCommand);
|
||||||
protected:
|
protected:
|
||||||
typedef std::vector<std::string> Elements;
|
typedef std::vector<std::string> Elements;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The output file to which to write the configuration.
|
* The output file to which to write the configuration.
|
||||||
*/
|
*/
|
||||||
cmCabilData::OutputFile* m_OutputFile;
|
cmCableData::OutputFile* m_OutputFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The elements describing the set of instantiations.
|
* The elements describing the set of instantiations.
|
||||||
|
|
|
@ -24,11 +24,11 @@
|
||||||
#include "cmWin32DefinesCommand.cxx"
|
#include "cmWin32DefinesCommand.cxx"
|
||||||
#include "cmWin32LibrariesCommand.cxx"
|
#include "cmWin32LibrariesCommand.cxx"
|
||||||
#include "cmConfigureFileNoAutoconf.cxx"
|
#include "cmConfigureFileNoAutoconf.cxx"
|
||||||
#include "cmCabilCommand.cxx"
|
#include "cmCableCommand.cxx"
|
||||||
#include "cmCabilData.cxx"
|
#include "cmCableData.cxx"
|
||||||
#include "cmCabilDefineSetCommand.cxx"
|
#include "cmCableDefineSetCommand.cxx"
|
||||||
#include "cmCabilInstantiateCommand.cxx"
|
#include "cmCableInstantiateCommand.cxx"
|
||||||
#include "cmCabilInstantiateClassCommand.cxx"
|
#include "cmCableInstantiateClassCommand.cxx"
|
||||||
#include "cmFindFileCommand.cxx"
|
#include "cmFindFileCommand.cxx"
|
||||||
#include "cmWrapExcludeFilesCommand.cxx"
|
#include "cmWrapExcludeFilesCommand.cxx"
|
||||||
#include "cmWrapTclCommand.cxx"
|
#include "cmWrapTclCommand.cxx"
|
||||||
|
@ -57,9 +57,9 @@ void GetPredefinedCommands(std::list<cmCommand*>& commands)
|
||||||
commands.push_back(new cmWin32DefinesCommand);
|
commands.push_back(new cmWin32DefinesCommand);
|
||||||
commands.push_back(new cmWin32LibrariesCommand);
|
commands.push_back(new cmWin32LibrariesCommand);
|
||||||
commands.push_back(new cmConfigureFileNoAutoconf);
|
commands.push_back(new cmConfigureFileNoAutoconf);
|
||||||
commands.push_back(new cmCabilDefineSetCommand);
|
commands.push_back(new cmCableDefineSetCommand);
|
||||||
commands.push_back(new cmCabilInstantiateCommand);
|
commands.push_back(new cmCableInstantiateCommand);
|
||||||
commands.push_back(new cmCabilInstantiateClassCommand);
|
commands.push_back(new cmCableInstantiateClassCommand);
|
||||||
commands.push_back(new cmFindFileCommand);
|
commands.push_back(new cmFindFileCommand);
|
||||||
commands.push_back(new cmWrapExcludeFilesCommand);
|
commands.push_back(new cmWrapExcludeFilesCommand);
|
||||||
commands.push_back(new cmWrapTclCommand);
|
commands.push_back(new cmWrapTclCommand);
|
||||||
|
|
Loading…
Reference in New Issue