Classes | Public Member Functions | Static Public Member Functions | List of all members
openfluid::waresdev::WareSrcFactory Class Reference

#include <waresdev/WareSrcFactory.hpp>

Classes

struct  Replacements
 

Public Member Functions

 WareSrcFactory (openfluid::ware::WareType Type)
 
 ~WareSrcFactory ()
 
void setWareId (const QString &Id)
 
bool createCMakeListsFile (QString &NewFilePath, QString &ErrMsg)
 
bool createJsonFile (QString &NewFilePath, QString &ErrMsg)
 
bool createCppFile (const Replacements &R, QString &NewFilePath, QString &ErrMsg)
 
bool createHppFile (const Replacements &R, QString &NewFilePath, QString &ErrMsg)
 
bool createParamUiCppFile (const Replacements &R, QString &NewFilePath, QString &ErrMsg)
 
bool createParamUiHppFile (const Replacements &R, QString &NewFilePath, QString &ErrMsg)
 
bool createCmakeConfigFile (const Replacements &R, QString &NewFilePath, QString &ErrMsg)
 

Static Public Member Functions

static QRegExp getCppFilenameRegExp (QString &Tooltip, bool IsHpp=false)
 
static QRegExp getClassnameRegExp (QString &Tooltip)
 
static QRegExp getWareIdRegExp (QString &Tooltip)
 
static QString getHeaderGuard (const QString &HppFilename)
 
static QString getHppFilename (const QString &CppFilename)
 
static QString getSimulatorSignatureInfos (const openfluid::ware::SimulatorSignature &Signature)
 
static QString getSimulatorSignatureData (const openfluid::ware::SimulatorSignature &Signature)
 
static QString getSimulatorInitCode (const openfluid::ware::SimulatorSignature &Signature)
 
static QString getSimulatorRunCode (const openfluid::ware::SimulatorSignature &Signature)
 
static QString getSimulatorSchedulingReturn (const openfluid::ware::SimulatorSignature &Signature)
 

Constructor & Destructor Documentation

openfluid::waresdev::WareSrcFactory::WareSrcFactory ( openfluid::ware::WareType  Type)
openfluid::waresdev::WareSrcFactory::~WareSrcFactory ( )

Member Function Documentation

bool openfluid::waresdev::WareSrcFactory::createCmakeConfigFile ( const Replacements R,
QString &  NewFilePath,
QString &  ErrMsg 
)

Creates a Cmake.in.config file in the ware directory, from the Cmake.in.config file template of the ware type.

Parameters
RReplacements struct containing the replacements to perform
NewFilePathA QString that will be filled with the absolute path of the created file
ErrMsgA QString that will be filled with error messages if the file creation fails
Returns
bool False if the file creation fails, true otherwise
bool openfluid::waresdev::WareSrcFactory::createCMakeListsFile ( QString &  NewFilePath,
QString &  ErrMsg 
)

Creates a CMakeLists file in the ware directory, from the CMakeLists file template of the ware type.

Parameters
NewFilePathA QString that will be filled with the absolute path of the created file
ErrMsgA QString that will be filled with error messages if the file creation fails
Returns
bool False if the file creation fails, true otherwise
bool openfluid::waresdev::WareSrcFactory::createCppFile ( const Replacements R,
QString &  NewFilePath,
QString &  ErrMsg 
)

Creates a main cpp file in the ware directory, from the source file template of the ware type, depending on the builder extension type (set to TYPE_UNKNOWN means it is not a Builder extension).

Parameters
RReplacements struct containing the replacements to perform
NewFilePathA QString that will be filled with the absolute path of the created file
ErrMsgA QString that will be filled with error messages if the file creation fails
Returns
bool False if the file creation fails, true otherwise
bool openfluid::waresdev::WareSrcFactory::createHppFile ( const Replacements R,
QString &  NewFilePath,
QString &  ErrMsg 
)

Creates a main hpp file in the ware directory, from the header file template of the ware type depending on the builder extension type (set to TYPE_UNKNOWN means it is not a Builder extension).

Parameters
RReplacements struct containing the replacements to perform
NewFilePathA QString that will be filled with the absolute path of the created file
ErrMsgA QString that will be filled with error messages if the file creation fails
Returns
bool False if the file creation fails, true otherwise
bool openfluid::waresdev::WareSrcFactory::createJsonFile ( QString &  NewFilePath,
QString &  ErrMsg 
)

Creates a wareshub.json file in the ware directory, from the (shared) Json file template.

Parameters
NewFilePathA QString that will be filled with the absolute path of the created file
ErrMsgA QString that will be filled with error messages if the file creation fails
Returns
bool False if the file creation fails, true otherwise
bool openfluid::waresdev::WareSrcFactory::createParamUiCppFile ( const Replacements R,
QString &  NewFilePath,
QString &  ErrMsg 
)

Creates a ui-parameterization cpp file in the ware directory, from the ui-parameterization source file template of the ware type.

Parameters
RReplacements struct containing the replacements to perform
NewFilePathA QString that will be filled with the absolute path of the created file
ErrMsgA QString that will be filled with error messages if the file creation fails
Returns
bool False if the file creation fails, true otherwise
bool openfluid::waresdev::WareSrcFactory::createParamUiHppFile ( const Replacements R,
QString &  NewFilePath,
QString &  ErrMsg 
)

Creates a ui-parameterization hpp file in the ware directory, from the ui-parameterization header file template of the ware type.

Parameters
RReplacements struct containing the replacements to perform
NewFilePathA QString that will be filled with the absolute path of the created file
ErrMsgA QString that will be filled with error messages if the file creation fails
Returns
bool False if the file creation fails, true otherwise
static QRegExp openfluid::waresdev::WareSrcFactory::getClassnameRegExp ( QString &  Tooltip)
static
static QRegExp openfluid::waresdev::WareSrcFactory::getCppFilenameRegExp ( QString &  Tooltip,
bool  IsHpp = false 
)
static
static QString openfluid::waresdev::WareSrcFactory::getHeaderGuard ( const QString &  HppFilename)
static
static QString openfluid::waresdev::WareSrcFactory::getHppFilename ( const QString &  CppFilename)
static
static QString openfluid::waresdev::WareSrcFactory::getSimulatorInitCode ( const openfluid::ware::SimulatorSignature Signature)
static
static QString openfluid::waresdev::WareSrcFactory::getSimulatorRunCode ( const openfluid::ware::SimulatorSignature Signature)
static
static QString openfluid::waresdev::WareSrcFactory::getSimulatorSchedulingReturn ( const openfluid::ware::SimulatorSignature Signature)
static
static QString openfluid::waresdev::WareSrcFactory::getSimulatorSignatureData ( const openfluid::ware::SimulatorSignature Signature)
static
static QString openfluid::waresdev::WareSrcFactory::getSimulatorSignatureInfos ( const openfluid::ware::SimulatorSignature Signature)
static
static QRegExp openfluid::waresdev::WareSrcFactory::getWareIdRegExp ( QString &  Tooltip)
static
void openfluid::waresdev::WareSrcFactory::setWareId ( const QString &  Id)

The documentation for this class was generated from the following file: