GLIP-Lib
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Glip::Modules::LayoutLoaderModule Class Referenceabstract

Module description for the LayoutLoader class. More...

#include <LayoutLoaderModules.hpp>

Inheritance diagram for Glip::Modules::LayoutLoaderModule:
Inheritance graph

Public Member Functions

virtual void apply (const std::vector< std::string > &arguments, const std::string &body, const std::string &currentPath, std::vector< std::string > &dynamicPaths, std::map< std::string, HdlTextureFormat > &formatList, std::map< std::string, ShaderSource > &sourceList, std::map< std::string, GeometryModel > &geometryList, std::map< std::string, FilterLayout > &filterList, std::map< std::string, PipelineLayout > &pipelineList, std::string &mainPipelineName, const std::vector< std::string > &staticPaths, const std::map< std::string, HdlTextureFormat > &requiredFormatList, const std::map< std::string, ShaderSource > &requiredSourceList, const std::map< std::string, GeometryModel > &requiredGeometryList, const std::map< std::string, PipelineLayout > &requiredPipelineList, const std::map< std::string, LayoutLoaderModule * > &moduleList, const std::string &sourceName, const int startLine, const int bodyLine, std::string &executionSource, std::string &executionSourceName, int &executionStartLine)=0
 Interface of the module : this function will be called on each corresponding token CALL for the LayoutLoader which has the module. More...
 
const std::string & getName (void) const
 Get the name of the module. More...
 
const int & getMinNumArguments (void) const
 Get the minimum number of arguments of the module. More...
 
const int & getMaxNumArguments (void) const
 Get the maximum number of arguments of the module. More...
 
const char & bodyPresenceTest (void) const
 Get the requirement on the body. More...
 
const std::string & getDescription (void) const
 Get the description of the module. More...
 
const std::string & getBodyDescription (void) const
 Get the description of the body of the module. More...
 
const std::vector< std::pair
< std::string, std::string > > & 
getArgumentsDescriptions (void) const
 Get the description of all the arguments of the module. More...
 
std::string getManual (void) const
 Get the manual of the module. More...
 
virtual void beginLoadLayout (void)
 Function called at the beginning of a loading session.
 
virtual void endLoadLayout (void)
 Function called at the end of a loading session.
 

Static Public Member Functions

static void addBasicModules (LayoutLoader &loader)
 Add the basic modules to a LayoutLoader. More...
 
static std::vector
< LayoutLoaderModule * > 
getBasicModulesList (void)
 Retrieve the list of standard modules. More...
 
static bool getBoolean (const std::string &arg, const std::string &sourceName="", int line=1)
 Convert a keyword to a boolean. More...
 
static void getCases (const std::string &body, std::string &trueCase, int &trueCaseStartLine, std::string &falseCase, int &falseCaseStartLine, const std::string &sourceName="", int bodyLine=1)
 Get true and false cases out of a body. More...
 
static std::vector< std::string > findFile (const std::string &filename, const std::vector< std::string > &dynamicPaths)
 Find in which path a file can be found. More...
 

Protected Member Functions

 LayoutLoaderModule (const std::string &_name, const std::string &_manual, const int &_minNumArguments, const int &_maxNumArguments, const char &_bodyPresence)
 LayoutLoaderModule constructor. For simple modules you can just use the macro LAYOUT_LOADER_MODULE_APPLY. More...
 

Detailed Description

Module description for the LayoutLoader class.

You can write a Module MyModule for a LayoutLoader object, load it, and allow the user to use CALL:MyModule. It will have limited access to the data of the LayoutLoader, and thus be able to create, modify or destroy formats, source codes, shaders, geometries, filters, pipelines, etc. Each Module has a name, a minimum and maximum number of arguments and the information on the need of a body or not.

In order to ease the creation of modules, you will find Macros for accessing data given to the Module.

Several modules are already created but need to be manually added to any LayoutLoader you would like to use via :

LayoutLoader myLoader;

Example in a script file :

REQUIRED_FORMAT: fmt (inputFormat)
// Create a new format by copying inputFormat and changing the filtering :
CALL: FORMAT_CHANGE_FILTERING (fmt, GL_LINEAR, GL_LINEAR, fmt1)
// Create a new format by copying inputFormat and dividing by 2 its size :
CALL: FORMAT_SCALE_SIZE (fmt, 0.5, fmt2)

Example, creating a simple Module :

// Declare your module in some header :
// (If your module was to be more complex, you will have to go through a full description)
// In the source file (must have exactly 3 arguments (min = max = 3), no body and show the manual if any errors occur) :
LAYOUT_LOADER_MODULE_APPLY( MyAdditionModule, 3, 3, -1, true, "DESCRIPTION{Increase or decrease the size of a format, save as a new format.}"
ARGUMENT:nameOriginal{Name of the original format.}"
ARGUMENT:delta{Integer, change in width/height.}"
ARGUMENT:nameNew{Name of the new format.}")
{
// Check that the target element exists :
FORMAT_MUST_EXIST( arguments[0] )
// Check that the output name is free :
FORMAT_MUST_NOT_EXIST( arguments.back() );
// Get an iterator to the target :
CONST_ITERATOR_TO_FORMAT( it, arguments[0] )
// Build the new format :
HdlTextureFormat newFmt = it->second;
// Read the delta argument :
CAST_ARGUMENT(1, int, delta)
// Change the size :
newFmt.setWidth( newFmt.getWidth() + delta );
newFmt.setHeight( newFmt.getHeight() + delta );
// Check the size :
if(newFmt.getWidth()<=0 || newFmt.getHeight()<=0)
throw Exception("The new format is not valid (size : " + toString(newFmt.getWidth()) + "x" + toString(newFmt.getHeight()) + ").", __FILE__, __LINE__);
// Append the new format under the right name :
APPEND_NEW_FORMAT( arguments.back(), newFmt )
}

Use it in a script :

CALL: MyAdditionModule(someFormat, 128, newLargerFormat)

Modules List

IF_MODULE_AVAILABLE

CALL:IF_MODULE_AVAILABLE(moduleName)
{
    body
}

Check if the MODULE is available and can be used.

ArgumentDescription
moduleName Name of the module to be used.

Body : Cases corresponding to the test : TRUE{...} FALSE{...}.

IF_FORMAT_DEFINED

CALL:IF_FORMAT_DEFINED(formatName)
{
    body
}

Check if the FORMAT was defined.

ArgumentDescription
formatName Name of the format to test.

Body : Cases corresponding to the test : TRUE{...} FALSE{...}.

IF_SOURCE_DEFINED

CALL:IF_SOURCE_DEFINED(sourceName)
{
    body
}

Check if the SOURCE was defined.

ArgumentDescription
sourceName Name of the source to test.

Body : Cases corresponding to the test : TRUE{...} FALSE{...}.

IF_GEOMETRY_DEFINED

CALL:IF_GEOMETRY_DEFINED(geometryName)
{
    body
}

Check if the GEOMETRY was defined.

ArgumentDescription
geometryName Name of the geometry to test.

Body : Cases corresponding to the test : TRUE{...} FALSE{...}.

IF_FILTERLAYOUT_DEFINED

CALL:IF_FILTERLAYOUT_DEFINED(filterLayoutName)
{
    body
}

Check if the FILTER_LAYOUT was defined.

ArgumentDescription
filterLayoutName Name of the filter layout to test.

Body : Cases corresponding to the test : TRUE{...} FALSE{...}.

IF_PIPELINELAYOUT_DEFINED

CALL:IF_PIPELINELAYOUT_DEFINED(pipelineLayoutName)
{
    body
}

Check if the PIPELINE_LAYOUT was defined.

ArgumentDescription
pipelineLayoutName Name of the pipeline layout to test.

Body : Cases corresponding to the test : TRUE{...} FALSE{...}.

IF_REQUIREDFORMAT_DEFINED

CALL:IF_REQUIREDFORMAT_DEFINED(requiredFormatName)
{
    body
}

Check if the REQUIRED_FORMAT was defined.

ArgumentDescription
requiredFormatName Name of the required format to test.

Body : Cases corresponding to the test : TRUE{...} FALSE{...}.

IF_REQUIREDGEOMETRY_DEFINED

CALL:IF_REQUIREDGEOMETRY_DEFINED(requiredGeometryName)
{
    body
}

Check if the REQUIRED_GEOMETRY was defined.

ArgumentDescription
requiredGeometryName Name of the required geometry to test.

Body : Cases corresponding to the test : TRUE{...} FALSE{...}.

IF_REQUIREDPIPELINE_DEFINED

CALL:IF_REQUIREDPIPELINE_DEFINED(requiredPipelineName)
{
    body
}

Check if the REQUIRED_PIPELINE was defined.

ArgumentDescription
requiredPipelineName Name of the required pipeline to test.

Body : Cases corresponding to the test : TRUE{...} FALSE{...}.

FORMAT_CHANGE_SIZE

CALL:FORMAT_CHANGE_SIZE(nameNew, nameOriginal, widthNew, heightNew)

Change the size of a format, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameOriginal Name of the original format
widthNew New width.
heightNew New height.

FORMAT_SCALE_SIZE

CALL:FORMAT_SCALE_SIZE(nameNew, nameOriginal, scaleFactor)

Scale a format by a scalar (or two), save as a new format. Will prevent to reach a 0x0 texture by ensuring that the size is at least 1 pixel in each dimension.

ArgumentDescription
nameNew Name of the new format.
nameOriginal Name of the original format.
scaleFactor Scaling to be applied, can be splitted into X and Y.

FORMAT_CHANGE_CHANNELS

CALL:FORMAT_CHANGE_CHANNELS(nameNew, nameOriginal, channelNew)

Change the channels of a format, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameOriginal Name of the original format.
channelNew New channel mode.

FORMAT_CHANGE_DEPTH

CALL:FORMAT_CHANGE_DEPTH(nameNew, nameOriginal, depthNew)

Change the depth of a format, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameOriginal Name of the original format.
depthNew New depth.

FORMAT_CHANGE_FILTERING

CALL:FORMAT_CHANGE_FILTERING(nameNew, nameOriginal, minNew, magNew)

Change the filtering of a format, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameOriginal Name of the original format.
minNew New minification filter.
magNew New magnification filter.

FORMAT_CHANGE_WRAPPING

CALL:FORMAT_CHANGE_WRAPPING(nameNew, nameOriginal, sNew, tNew)

Change the wrapping of a format, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameOriginal Name of the original format.
sNew New S wrapping parameter.
tNew New T wrapping parameter.

FORMAT_CHANGE_MIPMAP

CALL:FORMAT_CHANGE_MIPMAP(nameNew, nameOriginal, mNew)

Change the mipmap level of a format, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameOriginal Name of the original format.
mNew New maximum mipmap parameter.

FORMAT_MINIMUM_WIDTH

CALL:FORMAT_MINIMUM_WIDTH(nameNew, nameFormat1, nameFormat2 [, nameFormat3...])

Find the format having the smallest width, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameFormat1 Name of the fist format.
nameFormat2 Name of the second format.
nameFormat3... Other formats.

FORMAT_MAXIMUM_WIDTH

CALL:FORMAT_MAXIMUM_WIDTH(nameNew, nameFormat1, nameFormat2 [, nameFormat3...])

Find the format having the largest width, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameFormat1 Name of the first format.
nameFormat2 Name of the second format.
nameFormat3... Other formats.

FORMAT_MINIMUM_HEIGHT

CALL:FORMAT_MINIMUM_HEIGHT(nameNew, nameFormat1, nameFormat2 [, nameFormat3...])

Find the format having the smallest height, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameFormat1 Name of the fist format.
nameFormat2 Name of the second format.
nameFormat3... Other formats.

FORMAT_MAXIMUM_HEIGHT

CALL:FORMAT_MAXIMUM_HEIGHT(nameNew, nameFormat1, nameFormat2 [, nameFormat3...])

Find the format having the largest height, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameFormat1 Name of the fist format.
nameFormat2 Name of the second format.
nameFormat3... Other formats.

FORMAT_MINIMUM_PIXELS

CALL:FORMAT_MINIMUM_PIXELS(nameNew, nameFormat1, nameFormat2 [, nameFormat3...])

Find the format having the smallest number of pixels, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameFormat1 Name of the fist format.
nameFormat2 Name of the second format.
nameFormat3... Other formats.

FORMAT_MAXIMUM_PIXELS

CALL:FORMAT_MAXIMUM_PIXELS(nameNew, nameFormat1, nameFormat2 [, nameFormat3...])

Find the format having the largest number of pixels, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameFormat1 Name of the fist format.
nameFormat2 Name of the second format.
nameFormat3... Other formats.

FORMAT_MINIMUM_ELEMENTS

CALL:FORMAT_MINIMUM_ELEMENTS(nameNew, nameFormat1, nameFormat2 [, nameFormat3...])

Find the format having the smallest number of elements (pixels times channels count), save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameFormat1 Name of the fist format.
nameFormat2 Name of the second format.
nameFormat3... Other formats.

FORMAT_MAXIMUM_ELEMENTS

CALL:FORMAT_MAXIMUM_ELEMENTS(nameNew, nameFormat1, nameFormat2 [, nameFormat3...])

Find the format having the largest number of elements (pixels times channels count), save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameFormat1 Name of the fist format.
nameFormat2 Name of the second format.
nameFormat3... Other formats.

FORMAT_SMALLER_POWER_OF_TWO

CALL:FORMAT_SMALLER_POWER_OF_TWO(nameNew, nameFormat [, strict])

Generate a new format clamped to the closest smaller power of 2.

ArgumentDescription
nameNew Name of the new format.
nameFormat Name of the original format.
strict Either TRUE or FALSE (default).

FORMAT_LARGER_POWER_OF_TWO

CALL:FORMAT_LARGER_POWER_OF_TWO(nameNew, nameFormat [, strict])

Generate a new format clamped to the closest larger power of 2.

ArgumentDescription
nameNew Name of the new format.
nameFormat Name of the original format.
strict Either TRUE or FALSE (default).

FORMAT_SWAP_DIMENSIONS

CALL:FORMAT_SWAP_DIMENSIONS(nameNew, nameFormat)

Swap the width and height values, save as a new format.

ArgumentDescription
nameNew Name of the new format.
nameFormat Name of the original format.

IF_FORMAT_SETTING_MATCH

CALL:IF_FORMAT_SETTING_MATCH(nameFormat, nameSetting, value)
{
    body
}

Match if a format setting is equal to a value (unsigned integer or GL keyword).

ArgumentDescription
nameFormat Name of the targeted format.
nameSetting Name of the setting. See the documentation of HdlAbstractTextureFormat.
value The unsigned integer value or GLenum name to test against.

Body : Contains any or all of the blocks TRUE{...} and FALSE{...}. The right block will be exectuted following this test.

IF_FORMAT_SETTING_LARGERTHAN

CALL:IF_FORMAT_SETTING_LARGERTHAN(nameFormat, nameSetting, value)
{
    body
}

Match if a format setting is larger than a value (unsigned integer or GL keyword).

ArgumentDescription
nameFormat Name of the targeted format.
nameSetting Name of the setting. See the documentation of HdlAbstractTextureFormat.
value The unsigned integer value or GLenum name to test against.

Body : Contains any or all of the blocks TRUE{...} and FALSE{...}. The right block will be exectuted following this test.

GENERATE_SAME_SIZE_2D_GRID

CALL:GENERATE_SAME_SIZE_2D_GRID(nameNewGeometry, nameFormat [, normalized])

Create a 2D grid geometry of the same size as the format in argument (width and height).

ArgumentDescription
nameNewGeometry Name of the new geometry.
nameFormat Name of the original format.
normalized Either TRUE or FALSE. If enabled, the vertices coordinates will be in the range [0,1].

GENERATE_SAME_SIZE_3D_GRID

CALL:GENERATE_SAME_SIZE_3D_GRID(nameNewGeometry, nameFormat [, normalized])

Create a 3D grid geometry of the same size as the format in argument (width, height and number of channels).

ArgumentDescription
nameNewGeometry Name of the new geometry.
nameFormat Name of the original format.
normalized Either TRUE or FALSE. If enabled, the vertices coordinates will be in the range [0,1].

CHAIN_PIPELINES

CALL:CHAIN_PIPELINES(nameNewPipelineLayout, isStrict, namePipelineLayout1, namePipelineLayout2 [, namePipelineLayout3...])

Create a pipeline by connecting the pipelines passed in arguments.

ArgumentDescription
nameNewPipelineLayout Name of the new pipeline.
isStrict Either TRUE or FALSE. If enabled, the pipelines connection are enforced strictly (if outputs of the first pipeline are not equal to the number of input of the second pipeline, then the module will report an error.
namePipelineLayout1 Name of the first pipeline in the chain.
namePipelineLayout2 Name of the second pipeline in the chain.
namePipelineLayout3... Other pipelines.

FORMAT_TO_CONSTANT

CALL:FORMAT_TO_CONSTANT(formatName [, sourceName])

Create a SOURCE containing a const ivec2 declaration describing the size of the texture passed in argument. For instance, can be used in a shader with : INSERT(name).

ArgumentDescription
formatName Name of the texture format to be used.
sourceName Name of the source to be created. If not set, the name of the source will be the same as the name of the format.

SINGLE_FILTER_PIPELINE

CALL:SINGLE_FILTER_PIPELINE(pipelineName, outputTextureFormat)
{
    body
}

Create a pipeline with a single filter.

ArgumentDescription
pipelineName Name of the new pipeline.
outputTextureFormat Name of the format to render to.

Body : Source of the fragment shader to be implemented.

IF_GLSL_VERSION_MATCH

CALL:IF_GLSL_VERSION_MATCH(version)
{
    body
}

Test the GLSL available available during compilation.

ArgumentDescription
version The GLSL version name to be tested : 1.30, 3.30, etc.

Body : Contains any or all of the blocks TRUE{...} and FALSE{...}. The right block will be exectuted following this test.

ABORT_ERROR

CALL:ABORT_ERROR(error)
[{
    body
}]

Abort the Layout loading operation with a user defined error.

ArgumentDescription
error Error description.

Body : Optional, More complete description of the error.

GENERATE_FFT1D_PIPELINE

CALL:GENERATE_FFT1D_PIPELINE(width, name [, options...])
[{
    body
}]

Generate the 1D FFT Pipeline transformation.

ArgumentDescription
width Width, can be either a numeral or the name of an existing format.
name Name of the new pipeline.
options... Options to be used by the FFT process : SHIFTED, INVERSED, ZERO_PADDING, COMPATIBILITY_MODE, NO_INPUT.

Body : PRE{...} block contains a filtering function to be applied before the FFT. It must define a function vec4 pre(in vec4 colorFromTexture, in float x). POST{...} block contains a filtering function to be applied after the FFT. It must implement a function vec4 post(in vec4 colorAfterFFT, in float x). Both of these block can declare their own uniform variables.

GENERATE_FFT2D_PIPELINE

CALL:GENERATE_FFT2D_PIPELINE(width, height [, name, options...])
[{
    body
}]

Generate the 2D FFT Pipeline transformation.

ArgumentDescription
width Width, can be either a numeral or the name of an existing format.
height Height, can be either a numeral or the name of an existing format.
name Name of the new pipeline.
options... Options to be used by the FFT process : SHIFTED, INVERSED, ZERO_PADDING, COMPATIBILITY_MODE, NO_INPUT.

Body : PRE{...} block contains a filtering function to be applied before the FFT. It must define a function vec4 pre(in vec4 colorFromTexture, in vec2 x). POST{...} block contains a filtering function to be applied after the FFT. It must implement a function vec4 post(in vec4 colorAfterFFT, in vec2 x). Both of these block can declare their own uniform variables.

LOAD_OBJ_GEOMETRY

CALL:LOAD_OBJ_GEOMETRY(filename, geometryName [, strict])

Load a geometry from a Wavefront file (OBJ).

ArgumentDescription
filename Name of the file to load.
geometryName Name of the new geometry.
strict Either TRUE or FALSE. If enabled, the loader will abort upon inding an unknown tag.

LOAD_STL_GEOMETRY

CALL:LOAD_STL_GEOMETRY(filename, geometryName)

Load a geometry from a StereoLithography file (STL).

ArgumentDescription
filename Name of the file to load
geometryName Name of the new geometry.

Constructor & Destructor Documentation

LayoutLoaderModule::LayoutLoaderModule ( const std::string &  _name,
const std::string &  _manual,
const int &  _minNumArguments,
const int &  _maxNumArguments,
const char &  _bodyPresence 
)
protected

LayoutLoaderModule constructor. For simple modules you can just use the macro LAYOUT_LOADER_MODULE_APPLY.

Parameters
_nameName of the module.
_manualManual of the module, see extended description for formanting.
_minNumArgumentsMinimum number of arguments of the module.
_maxNumArgumentsMaximum number of arguments of the module (-1 for no limitation).
_bodyPresenceRequirement on the body (-1 for no body, 0 for indifferent, 1 for needed).

The Manual string can either be a simple string containin the description or a string containing the following elements (all optional) :

const std::string manual = "DESCRIPTION{Description of the module.}"
"ARGUMENT:argument0Name{Argument 0 description.}"
"ARGUMENT:argument1Name{Argument 1 description.}"
"BODY_DESCRIPTION{Body description}";

With this specific formating the documentation will be automatically generated in various formats (HTML, Command Line Help, etc.) with a coherent layout.

Member Function Documentation

void LayoutLoaderModule::addBasicModules ( LayoutLoader loader)
static

Add the basic modules to a LayoutLoader.

Parameters
loaderA LayoutLoader object.
void Glip::Modules::LayoutLoaderModule::apply ( const std::vector< std::string > &  arguments,
const std::string &  body,
const std::string &  currentPath,
std::vector< std::string > &  dynamicPaths,
std::map< std::string, HdlTextureFormat > &  formatList,
std::map< std::string, ShaderSource > &  sourceList,
std::map< std::string, GeometryModel > &  geometryList,
std::map< std::string, FilterLayout > &  filterList,
std::map< std::string, PipelineLayout > &  pipelineList,
std::string &  mainPipelineName,
const std::vector< std::string > &  staticPaths,
const std::map< std::string, HdlTextureFormat > &  requiredFormatList,
const std::map< std::string, ShaderSource > &  requiredSourceList,
const std::map< std::string, GeometryModel > &  requiredGeometryList,
const std::map< std::string, PipelineLayout > &  requiredPipelineList,
const std::map< std::string, LayoutLoaderModule * > &  moduleList,
const std::string &  sourceName,
const int  startLine,
const int  bodyLine,
std::string &  executionSource,
std::string &  executionSourceName,
int &  executionStartLine 
)
pure virtual

Interface of the module : this function will be called on each corresponding token CALL for the LayoutLoader which has the module.

Parameters
argumentsThe arguments of the called, their number has already been checked.
bodyThe body of the call (might be empty), its presence has already been checked.
currentPathThe currentPath in which the LayoutLoader is operating.
dynamicPathsThe list of paths dynamically built (only for the current load operation).
formatListThe list of formats currently loaded. For easy access see ITERATOR_TO_FORMAT, CONST_ITERATOR_TO_FORMAT, FORMAT_MUST_EXIST, FORMAT_MUST_NOT_EXIST and APPEND_NEW_FORMAT.
sourceListThe list of sources currently loaded. For easy access see ITERATOR_TO_SOURCE, CONST_ITERATOR_TO_SOURCE, SOURCE_MUST_EXIST, SOURCE_MUST_NOT_EXIST and APPEND_NEW_SOURCE.
geometryListThe list of geometries currently loaded. For easy access see ITERATOR_TO_GEOMETRY, CONST_ITERATOR_TO_GEOMETRY, GEOMETRY_MUST_EXIST, GEOMETRY_MUST_NOT_EXIST and APPEND_NEW_GEOMETRY.
filterListThe list of filters currently loaded. For easy access see ITERATOR_TO_FILTER, CONST_ITERATOR_TO_FILTER, FILTER_MUST_EXIST, FILTER_MUST_NOT_EXIST and APPEND_NEW_FILTER.
pipelineListThe list of pipelines currently loaded. For easy access see ITERATOR_TO_PIPELINE, CONST_ITERATOR_TO_PIPELINE, PIPELINE_MUST_EXIST, PIPELINE_MUST_NOT_EXIST and APPEND_NEW_PIPELINE.
mainPipelineNameThe name of the current main pipeline, if already parsed.
staticPathsThe list of static paths (known for all load operations).
requiredFormatListThe list of static formats available. For easy access see CONST_ITERATOR_TO_REQUIREDFORMAT, REQUIREDFORMAT_MUST_EXIST, REQUIREDFORMAT_MUST_NOT_EXIST.
requiredSourceListThe list of static sources available. For easy access see CONST_ITERATOR_TO_REQUIREDSOURCE, REQUIREDSOURCE_MUST_EXIST, REQUIREDSOURCE_MUST_NOT_EXIST.
requiredGeometryListThe list of static geometries available. For easy access see CONST_ITERATOR_TO_REQUIREDGEOMETRY, REQUIREDGEOMETRY_MUST_EXIST, REQUIREDGEOMETRY_MUST_NOT_EXIST.
requiredPipelineListThe list of static pipelines available. For easy access see CONST_ITERATOR_TO_REQUIREDPIPELINE, REQUIREDPIPELINE_MUST_EXIST, REQUIREDPIPELINE_MUST_NOT_EXIST.
moduleListThe list of modules available. For easy access see CONST_ITERATOR_TO_MODULE, MODULE_MUST_EXIST, MODULE_MUST_NOT_EXIST.
sourceNameName of the source from which the call was extracted.
startLineLine index of the module call.
bodyLineLine index of the body for this module call.
executionSourceThe code which has to be run at after the function complete (leave it empty if no code needs to be run, the syntax of the code expected is the same as scripts).
executionSourceNameThe name of the source for the post-execution.
executionStartLineThe first line number of the source for the post-execution.
const char & LayoutLoaderModule::bodyPresenceTest ( void  ) const

Get the requirement on the body.

Returns
A byte containing the requirement as -1 for no body, 0 for indifferent and 1 for needed.
std::vector< std::string > LayoutLoaderModule::findFile ( const std::string &  filename,
const std::vector< std::string > &  dynamicPaths 
)
static

Find in which path a file can be found.

Parameters
filenameFile name to be searched.
dynamicPathsList of paths in which to search.
Returns
A list of paths in which the file was found (possibly empty).
const std::vector< std::pair< std::string, std::string > > & LayoutLoaderModule::getArgumentsDescriptions ( void  ) const

Get the description of all the arguments of the module.

Returns
A vector of pairs containing the description (second) of each arguments (first).
std::vector< LayoutLoaderModule * > LayoutLoaderModule::getBasicModulesList ( void  )
static

Retrieve the list of standard modules.

Returns
A vector containing pointers to the basic modules. The client code has the responsability of deleting these modules.
const std::string & LayoutLoaderModule::getBodyDescription ( void  ) const

Get the description of the body of the module.

Returns
A string containing the description of the body of the module. Possibly empty.
bool LayoutLoaderModule::getBoolean ( const std::string &  arg,
const std::string &  sourceName = "",
int  line = 1 
)
static

Convert a keyword to a boolean.

Parameters
argThe keyword (expected to be either TRUE or FALSE).
sourceNameName of the source.
lineCorresponding line number in the source.
Returns
True or false depending on the content of arg or raise an exception if the value is not any of these two symbols.
void LayoutLoaderModule::getCases ( const std::string &  body,
std::string &  trueCase,
int &  trueCaseStartLine,
std::string &  falseCase,
int &  falseCaseStartLine,
const std::string &  sourceName = "",
int  bodyLine = 1 
)
static

Get true and false cases out of a body.

In a if-statement you can write :

IF(statement)
{
TRUE
{
...
}
FALSE
{
...
}
}
Parameters
bodyBody to extract the data from.
trueCaseBody of the true statement (not modified if not found).
trueCaseStartLineLine number where the body of the true case is starting (not modified if not found).
falseCaseBody of the false statement (not modified if not found).
falseCaseStartLineLine number where the body of the false case is starting (not modified if not found).
sourceNameName of the source.
bodyLineLine counter start index.
const std::string & LayoutLoaderModule::getDescription ( void  ) const

Get the description of the module.

Returns
A string containing the description of the module.
std::string LayoutLoaderModule::getManual ( void  ) const

Get the manual of the module.

Returns
A standard string containing the manual of the module.
const int & LayoutLoaderModule::getMaxNumArguments ( void  ) const

Get the maximum number of arguments of the module.

Returns
An integer being the maximum number of arguments of the module.
const int & LayoutLoaderModule::getMinNumArguments ( void  ) const

Get the minimum number of arguments of the module.

Returns
An integer being the minimum number of arguments of the module.
const std::string & LayoutLoaderModule::getName ( void  ) const

Get the name of the module.

Returns
A standard string containing the name of the module.

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