![]() |
Orfeo Toolbox
3.16
|
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:Public Types | |
| typedef itk::SmartPointer < const Self > | ConstPointer |
| typedef std::map< std::string, int > | FunctionMapType |
| typedef Parser | ParserType |
| typedef itk::SmartPointer< Self > | Pointer |
| 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 |
Definition of the standard floating point parser. Standard implementation of the mathematical expressions parser.
Definition at line 37 of file otbParser.h.
| typedef itk::SmartPointer<const Self> otb::Parser::ConstPointer |
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.
|
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.
|
private |
Definition at line 93 of file otbParser.h.
| typedef Parser otb::Parser::ParserType |
Convenient type definitions
Definition at line 50 of file otbParser.h.
| typedef itk::SmartPointer<Self> otb::Parser::Pointer |
Reimplemented from itk::LightObject.
Definition at line 43 of file otbParser.h.
| typedef Parser otb::Parser::Self |
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.
|
protected |
Definition at line 218 of file otbParser.cxx.
|
protectedvirtual |
Definition at line 223 of file otbParser.cxx.
|
private |
|
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 | ( | ) |
| void otb::Parser::ClearVar | ( | ) |
Clear all the defined variables
Definition at line 242 of file otbParser.cxx.
References m_InternalParser.
|
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 | ||
| ) |
|
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 | ( | ) |
| 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 |
Run-time type information (and related methods)
Reimplemented from itk::LightObject.
|
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 |
New macro for creation of through a Smart Pointer
Reimplemented from itk::LightObject.
|
private |
|
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<<().
|
protectedvirtualinherited |
Define a default print header for all objects.
Definition at line 320 of file itkLightObject.cxx.
|
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().
|
protectedvirtualinherited |
Define a default print trailer for all objects.
Definition at line 331 of file itkLightObject.cxx.
|
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.
|
virtual |
Set the expression to be parsed
Definition at line 227 of file otbParser.cxx.
References m_InternalParser.
|
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.
|
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().
|
private |
Definition at line 94 of file otbParser.h.
Referenced by CheckExpr(), ClearVar(), DefineVar(), Eval(), GetExpr(), GetFunList(), GetVar(), and SetExpr().
|
mutableprotectedinherited |
Number of uses of this object by other objects.
Definition at line 141 of file itkLightObject.h.
|
mutableprotectedinherited |
Mutex lock to protect modification to the reference count
Definition at line 144 of file itkLightObject.h.