Orfeo Toolbox  3.16
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes
otb::Parser Class Reference

Definition of the standard floating point parser. Standard implementation of the mathematical expressions parser. More...

#include <otbParser.h>

+ Inheritance diagram for otb::Parser:
+ Collaboration diagram for otb::Parser:

List of all members.

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
typedef std::map< std::string,
int > 
FunctionMapType
typedef Parser ParserType
typedef itk::SmartPointer< SelfPointer
typedef Parser Self
typedef itk::LightObject Superclass
typedef double ValueType

Public Member Functions

bool CheckExpr ()
void ClearVar ()
virtual ::itk::LightObject::Pointer CreateAnother (void) const
void DefineVar (const std::string &sName, ValueType *fVar)
virtual void Delete ()
ValueType Eval ()
const std::string & GetExpr () const
FunctionMapType GetFunList () const
virtual const char * GetNameOfClass () const
virtual int GetReferenceCount () const
const std::map< std::string,
Parser::ValueType * > & 
GetVar () const
void Print (std::ostream &os, Indent indent=0) const
virtual void Register () const
virtual void SetExpr (const std::string &Expression)
virtual void SetReferenceCount (int)
virtual void UnRegister () const

Static Public Member Functions

static void BreakOnError ()
static Pointer New ()

Protected Types

typedef int InternalReferenceCountType

Protected Member Functions

 Parser ()
virtual ~Parser ()
virtual void PrintHeader (std::ostream &os, Indent indent) const
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const
virtual void PrintTrailer (std::ostream &os, Indent indent) const

Protected Attributes

InternalReferenceCountType m_ReferenceCount
SimpleFastMutexLock m_ReferenceCountLock

Private Types

typedef itk::SmartPointer
< ParserImpl
ParserImplPtr

Private Member Functions

 Parser (const Self &)
void operator= (const Self &)

Private Attributes

ParserImplPtr m_InternalParser

Detailed Description

Definition of the standard floating point parser. Standard implementation of the mathematical expressions parser.

See also:
BandMathImageFilter

Definition at line 37 of file otbParser.h.


Member Typedef Documentation

Reimplemented from itk::LightObject.

Definition at line 44 of file otbParser.h.

typedef std::map<std::string, int> otb::Parser::FunctionMapType

Type for function/number of arguments map

Definition at line 57 of file otbParser.h.

typedef int itk::LightObject::InternalReferenceCountType
protectedinherited

Define the type of the reference count according to the target. This allows the use of atomic operations

Definition at line 137 of file itkLightObject.h.

Definition at line 93 of file otbParser.h.

Convenient type definitions

Definition at line 50 of file otbParser.h.

Reimplemented from itk::LightObject.

Definition at line 43 of file otbParser.h.

Standard class typedefs.

Reimplemented from itk::LightObject.

Definition at line 41 of file otbParser.h.

Definition at line 42 of file otbParser.h.

typedef double otb::Parser::ValueType

Definition at line 54 of file otbParser.h.


Constructor & Destructor Documentation

otb::Parser::Parser ( )
protected

Definition at line 218 of file otbParser.cxx.

otb::Parser::~Parser ( )
protectedvirtual

Definition at line 223 of file otbParser.cxx.

otb::Parser::Parser ( const Self )
private

Member Function Documentation

void itk::LightObject::BreakOnError ( )
staticinherited

This method is called when itkExceptionMacro executes. It allows the debugger to break on error.

Definition at line 149 of file itkLightObject.cxx.

bool otb::Parser::CheckExpr ( )

Check Expression

Definition at line 247 of file otbParser.cxx.

References m_InternalParser.

void otb::Parser::ClearVar ( )

Clear all the defined variables

Definition at line 242 of file otbParser.cxx.

References m_InternalParser.

virtual::itk::LightObject::Pointer otb::Parser::CreateAnother ( void  ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::LightObject.

void otb::Parser::DefineVar ( const std::string &  sName,
Parser::ValueType fVar 
)

Define a variable

Definition at line 237 of file otbParser.cxx.

References m_InternalParser.

void itk::LightObject::Delete ( )
virtualinherited

Delete an itk object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting.

Delete a itk object. This method should always be used to delete an object when the new operator was used to create it. Using the C++ delete method will not work with reference counting.

Definition at line 88 of file itkLightObject.cxx.

Parser::ValueType otb::Parser::Eval ( )

Trigger the parsing

Definition at line 232 of file otbParser.cxx.

References m_InternalParser.

const std::string & otb::Parser::GetExpr ( ) const

Return the expression to be parsed

Definition at line 253 of file otbParser.cxx.

References m_InternalParser.

Parser::FunctionMapType otb::Parser::GetFunList ( ) const

Return a map of function names and associated number of arguments

Definition at line 265 of file otbParser.cxx.

References m_InternalParser.

virtual const char* otb::Parser::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods)

Reimplemented from itk::LightObject.

virtual int itk::LightObject::GetReferenceCount ( ) const
inlinevirtualinherited

Gets the reference count on this object.

Definition at line 105 of file itkLightObject.h.

const std::map< std::string, Parser::ValueType * > & otb::Parser::GetVar ( ) const

Return the list of variables

Definition at line 259 of file otbParser.cxx.

References m_InternalParser.

static Pointer otb::Parser::New ( )
static

New macro for creation of through a Smart Pointer

Reimplemented from itk::LightObject.

void otb::Parser::operator= ( const Self )
private
void itk::LightObject::Print ( std::ostream &  os,
Indent  indent = 0 
) const
inherited

Cause the object to print itself out.

Avoid DLL boundary problems. This function will be common to all itk objects. It just calls the header/self/trailer virtual print methods, which can be overriden by subclasses (any itk object).

Definition at line 135 of file itkLightObject.cxx.

References itk::Indent::GetNextIndent().

Referenced by itk::operator<<().

void itk::LightObject::PrintHeader ( std::ostream &  os,
Indent  indent 
) const
protectedvirtualinherited

Define a default print header for all objects.

Definition at line 320 of file itkLightObject.cxx.

void otb::Parser::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Chaining method to print an object's instance variables, as well as its superclasses.

Reimplemented from itk::LightObject.

Definition at line 212 of file otbParser.cxx.

References itk::LightObject::PrintSelf().

void itk::LightObject::PrintTrailer ( std::ostream &  os,
Indent  indent 
) const
protectedvirtualinherited

Define a default print trailer for all objects.

Definition at line 331 of file itkLightObject.cxx.

void itk::LightObject::Register ( ) const
virtualinherited

Increase the reference count (mark as used by another object).

Reimplemented in itk::ExceptionObject::ReferenceCountedExceptionData, and itk::Object.

Definition at line 160 of file itkLightObject.cxx.

void otb::Parser::SetExpr ( const std::string &  Expression)
virtual

Set the expression to be parsed

Definition at line 227 of file otbParser.cxx.

References m_InternalParser.

void itk::LightObject::SetReferenceCount ( int  ref)
virtualinherited

Sets the reference count on this object. This is a dangerous method, use it with care.

Sets the reference count (use with care)

Reimplemented in itk::Object.

Definition at line 244 of file itkLightObject.cxx.

void itk::LightObject::UnRegister ( ) const
virtualinherited

Decrease the reference count (release by another object).

Reimplemented in itk::ExceptionObject::ReferenceCountedExceptionData, and itk::Object.

Definition at line 192 of file itkLightObject.cxx.

Referenced by itk::LightObject::New().


Member Data Documentation

ParserImplPtr otb::Parser::m_InternalParser
private

Definition at line 94 of file otbParser.h.

Referenced by CheckExpr(), ClearVar(), DefineVar(), Eval(), GetExpr(), GetFunList(), GetVar(), and SetExpr().

InternalReferenceCountType itk::LightObject::m_ReferenceCount
mutableprotectedinherited

Number of uses of this object by other objects.

Definition at line 141 of file itkLightObject.h.

SimpleFastMutexLock itk::LightObject::m_ReferenceCountLock
mutableprotectedinherited

Mutex lock to protect modification to the reference count

Definition at line 144 of file itkLightObject.h.


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

Generated at Sun Feb 3 2013 03:51:39 for Orfeo Toolbox with doxygen 1.8.1.1