te::se::StringPosition Class Referenceabstract

It returns the position of first occurence of a substring (String formatting functions). More...

#include <StringPosition.h>

Inheritance diagram for te::se::StringPosition:
te::se::Function te::fe::Expression te::common::BaseVisitable< Visitor >

Public Types

typedef void ReturnType
 
enum  SearchDirectionType { FRONTTOBACK, BACKTOFRONT }
 It controls the direction of search. More...
 
typedef Visitor VisitorType
 

Public Member Functions

virtual ReturnType accept (VisitorType &guest) const =0
 It call the visit method from the guest object. More...
 
virtual Expressionclone () const =0
 It returns a clone of this object. More...
 
const std::string & getFallbackValue () const
 
void setFallbackValue (const std::string &v)
 
void setLookupString (ParameterValue *v)
 
void setSearchDirection (SearchDirectionType t)
 
void setStringValue (ParameterValue *v)
 
Initializer Methods

Methods related to instantiation and destruction.

 StringPosition ()
 It initializes a new StringPosition. More...
 
 ~StringPosition ()
 Destructor. More...
 

Protected Attributes

std::string m_fallbackValue
 The value of the fallbackValue attribute is used as a default value, if the SE implementation does not support the function. If the implementation supports the function, then the result value is determined by executing the function. (Mandatory) More...
 

Private Attributes

ParameterValuem_lookupString
 Mandatory. More...
 
SearchDirectionType m_searchDirection
 Mandatory. More...
 
ParameterValuem_stringValue
 Mandatory. More...
 

Detailed Description

It returns the position of first occurence of a substring (String formatting functions).

This function returns the position of the first occurrence (counting from 1) of the LookupString in StringValue. Zero is returned in case of search failure. The direction of search is determined by the attribute searchdirection, which can take values "frontToBack" and "backToFront", where the former is the default.

See also
Function, ParameterValue, StringLength, Trim

Definition at line 54 of file StringPosition.h.

Member Typedef Documentation

typedef void te::common::BaseVisitable< Visitor , void >::ReturnType
inherited

Definition at line 58 of file BaseVisitable.h.

typedef Visitor te::common::BaseVisitable< Visitor , void >::VisitorType
inherited

Definition at line 57 of file BaseVisitable.h.

Member Enumeration Documentation

It controls the direction of search.

Enumerator
FRONTTOBACK 

It means to search from front to back.

BACKTOFRONT 

It means to search from back to front.

Definition at line 63 of file StringPosition.h.

Constructor & Destructor Documentation

te::se::StringPosition::StringPosition ( )

It initializes a new StringPosition.

te::se::StringPosition::~StringPosition ( )

Destructor.

Member Function Documentation

virtual ReturnType te::common::BaseVisitable< Visitor , void >::accept ( VisitorType guest) const
pure virtualinherited

It call the visit method from the guest object.

Parameters
guestThe guest or visitor.
Returns
Any valid value define by the template type R.
virtual Expression* te::fe::Expression::clone ( ) const
pure virtualinherited
const std::string& te::se::Function::getFallbackValue ( ) const
inherited
void te::se::Function::setFallbackValue ( const std::string &  v)
inherited
void te::se::StringPosition::setLookupString ( ParameterValue v)
void te::se::StringPosition::setSearchDirection ( SearchDirectionType  t)
void te::se::StringPosition::setStringValue ( ParameterValue v)

Member Data Documentation

std::string te::se::Function::m_fallbackValue
protectedinherited

The value of the fallbackValue attribute is used as a default value, if the SE implementation does not support the function. If the implementation supports the function, then the result value is determined by executing the function. (Mandatory)

Definition at line 88 of file Function.h.

ParameterValue* te::se::StringPosition::m_lookupString
private

Mandatory.

Definition at line 88 of file StringPosition.h.

SearchDirectionType te::se::StringPosition::m_searchDirection
private

Mandatory.

Definition at line 90 of file StringPosition.h.

ParameterValue* te::se::StringPosition::m_stringValue
private

Mandatory.

Definition at line 89 of file StringPosition.h.


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