Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

mpcl::text::codegen::TClauseBodyString Class Reference

#include <clause_body_string.hh>

Inheritance diagram for mpcl::text::codegen::TClauseBodyString:

List of all members.

Public Types

typedef IStreamable::char_type char_type
 Disambiguate char type.

typedef IStreamable::traits_type traits_type
 Disambiguate traits type.


Public Methods

 TClauseBodyString (void)
 Builds a new instance.

 TClauseBodyString (const char *pkcSOURCE_CLAUSE_BODY)
 TClauseBodyString (const TString &rkySOURCE_CLAUSE_BODY)
TClauseBodyString & operator= (const TClauseBodyString &rkySOURCE_CLAUSE_BODY)
void setParameterExistenceSensitiveness (bool gSENSITIVENESS)
TString instantiate (void) const
TString instantiate (const char *pkcFIRST_PARAMETER_NAME, const char *pkcFIRST_PARAMETER_VALUE...) const
TString instantiate (const TStringToVariableMap &rktSOURCE_VARIABLE_MAP) const
TString instantiate (const TStringToStringMap &rktSOURCE_STRING_TO_STRING_MAP) const
TString instantiate (const TStringToVariableMap &rktSOURCE_VARIABLE_MAP, bool gPARAMETER_EXISTENCE_SENSITIVENESS) const
TString instantiate (const TStringToStringMap &rktSOURCE_STRING_MAP, bool gPARAMETER_EXISTENCE_SENSITIVENESS) const

Protected Methods

void read (basic_istream< char_type, traits_type > &rtSOURCE_ISTREAM)
 Reads the instance from stream rtSOURCE_ISTREAM.

void write (basic_ostream< char_type, traits_type > &rtTARGET_OSTREAM) const
TString preprocess (void) const

Protected Attributes

bool gParameterExistenceSensitiveness

Detailed Description

Clause body string for pattern based code generator.
See also:
TPatternBasedCodeGenerator.

Definition at line 77 of file clause_body_string.hh.


Constructor & Destructor Documentation

mpcl::text::codegen::TClauseBodyString::TClauseBodyString const char *    pkcSOURCE_CLAUSE_BODY [inline]
 

Builds a new instance from string pkcSOURCE_CLAUSE_BODY.

Parameters:
pkcSOURCE_CLAUSE_BODY  Source string.

Definition at line 120 of file clause_body_string.hh.

References gParameterExistenceSensitiveness, and mpcl::text::TString.

mpcl::text::codegen::TClauseBodyString::TClauseBodyString const TString   rkySOURCE_CLAUSE_BODY [inline]
 

Builds a new instance from string rkySOURCE_CLAUSE_BODY.

Parameters:
rkySOURCE_CLAUSE_BODY  Source string.

Definition at line 129 of file clause_body_string.hh.

References gParameterExistenceSensitiveness, and mpcl::text::TString.


Member Function Documentation

mpcl::text::TString mpcl::text::codegen::TClauseBodyString::instantiate const TStringToStringMap &    rktSOURCE_STRING_MAP,
bool    gPARAMETER_EXISTENCE_SENSITIVENESS
const
 

Gets a string that is a instance of the code pattern result of substituting variables in rktSOURCE_STRING_MAP. If gPARAMETER_EXISTENCE_SENSITIVENESS is true, then any variable that doesn't exist in this instance string will cause an exception throw.

Parameters:
rktSOURCE_STRING_MAP  Source variable map.
gPARAMETER_EXISTENCE_SENSITIVENESS  True if there musts generate an exception if a variable is not in this instance string.
Returns:
Instantiated string.
See also:
TStringToStringMap.

Definition at line 188 of file clause_body_string.cc.

References mpcl::text::Format(), preprocess(), mpcl::text::TString, and mpcl::util::collection::TStringToStringMap.

mpcl::text::TString mpcl::text::codegen::TClauseBodyString::instantiate const TStringToVariableMap   rktSOURCE_VARIABLE_MAP,
bool    gPARAMETER_EXISTENCE_SENSITIVENESS
const
 

Gets a string that is a instance of the code pattern result of substituting variables in rktSOURCE_VARIABLE_MAP. If gPARAMETER_EXISTENCE_SENSITIVENESS is true, then any variable that doesn't exist in this instance string will cause an exception throw.

Parameters:
rktSOURCE_VARIABLE_MAP  Source variable map.
gPARAMETER_EXISTENCE_SENSITIVENESS  True if there musts generate an exception if a variable is not in this instance string.
Returns:
Instantiated string.
See also:
TStringToVariableMap.

Definition at line 137 of file clause_body_string.cc.

References mpcl::text::Format(), preprocess(), mpcl::text::TString, and mpcl::text::codegen::TStringToVariableMap.

TString mpcl::text::codegen::TClauseBodyString::instantiate const TStringToStringMap &    rktSOURCE_STRING_TO_STRING_MAP const [inline]
 

Gets a string that is a instance of the code pattern result of substituting variables in rktSOURCE_STRING_TO_STRING_MAP.

Parameters:
rktSOURCE_STRING_TO_STRING_MAP  Source variable map.
Returns:
Instantiated string.
See also:
TStringToStringMap.

Definition at line 207 of file clause_body_string.hh.

References gParameterExistenceSensitiveness, instantiate(), mpcl::text::TString, and mpcl::util::collection::TStringToStringMap.

TString mpcl::text::codegen::TClauseBodyString::instantiate const TStringToVariableMap   rktSOURCE_VARIABLE_MAP const [inline]
 

Gets a string that is a instance of the code pattern result of substituting variables in rktSOURCE_VARIABLE_MAP.

Parameters:
rktSOURCE_VARIABLE_MAP  Source variable map.
Returns:
Instantiated string.
See also:
TStringToVariableMap.

Definition at line 195 of file clause_body_string.hh.

References gParameterExistenceSensitiveness, instantiate(), mpcl::text::TString, and mpcl::text::codegen::TStringToVariableMap.

mpcl::text::TString mpcl::text::codegen::TClauseBodyString::instantiate const char *    pkcFIRST_PARAMETER_NAME,
const char *    pkcFIRST_PARAMETER_VALUE...
const
 

Gets a string that is a instance of the code pattern result of substituting pkcFIRST_PARAMETER_NAME by pkcFIRST_PARAMETER_VALUE, and so, with the rest of optional parameters pairs.

Parameters:
pkcFIRST_PARAMETER_NAME  First parameter name.
pkcFIRST_PARAMETER_VALUE  First parameter value.
...  Next parameter name/value pairs.
Returns:
Instantiated string.

Definition at line 65 of file clause_body_string.cc.

References mpcl::text::Format(), and mpcl::text::TString.

TString mpcl::text::codegen::TClauseBodyString::instantiate void    const [inline]
 

Gets a string that is a instance of the code pattern.

Returns:
Instantiated string.

Definition at line 171 of file clause_body_string.hh.

References preprocess(), and mpcl::text::TString.

Referenced by instantiate().

mpcl::text::codegen::TClauseBodyString & mpcl::text::codegen::TClauseBodyString::operator= const TClauseBodyString &    rkySOURCE_CLAUSE_BODY
 

Copies from instance rkySOURCE_CLAUSE_BODY.

Parameters:
rkySOURCE_CLAUSE_BODY  Source instance.
Returns:
This instance.

Definition at line 36 of file clause_body_string.cc.

mpcl::text::TString mpcl::text::codegen::TClauseBodyString::preprocess void    const [protected]
 

Gets a string that is the result of preprocessing current code (changing entities for its values).

Returns:
Pre-processed string.

Definition at line 246 of file clause_body_string.cc.

References mpcl::text::codegen::InstantiateEntities(), and mpcl::text::TString.

Referenced by instantiate().

void mpcl::text::codegen::TClauseBodyString::setParameterExistenceSensitiveness bool    gSENSITIVENESS [inline]
 

Sets the attribute-existence sensitiveness.

Parameters:
gSENSITIVENESS  Sensitiveness state.

Definition at line 145 of file clause_body_string.hh.

References gParameterExistenceSensitiveness.

void mpcl::text::codegen::TClauseBodyString::write basic_ostream< char_type, traits_type > &    rtTARGET_OSTREAM const [protected]
 

Writes the instance onto stream rtTARGET_OSTREAM.

Parameters:
rtTARGET_OSTREAM  Target stream.

Definition at line 236 of file clause_body_string.cc.

References mpcl::text::codegen::operator<<().


Member Data Documentation

bool mpcl::text::codegen::TClauseBodyString::gParameterExistenceSensitiveness [protected]
 

Boolean with parameter existence sensitiveness when the instantiation has to be done.

Definition at line 101 of file clause_body_string.hh.

Referenced by instantiate(), setParameterExistenceSensitiveness(), and TClauseBodyString().


The documentation for this class was generated from the following files:
Generated on Mon Oct 13 02:35:26 2003 for MPCL by doxygen1.2.18