OTB  9.0.0
Orfeo Toolbox
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
otb::Wrapper::ChoiceParameter Class Reference

#include <otbWrapperChoiceParameter.h>

+ Inheritance diagram for otb::Wrapper::ChoiceParameter:
+ Collaboration diagram for otb::Wrapper::ChoiceParameter:

Classes

struct  Choice
 

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef ChoiceParameter Self
 
typedef Parameter Superclass
 
- Public Types inherited from otb::Wrapper::Parameter
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef Parameter Self
 
typedef itk::Object Superclass
 

Public Member Functions

void AddChoice (std::string choicekey, std::string choiceName)
 
void ClearValue () override
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
void FromInt (int value) override
 
void FromString (const std::string &value) override
 
std::string GetChoiceKey (int i) const
 
std::vector< std::string > GetChoiceKeys ()
 
std::string GetChoiceName (int i)
 
std::vector< std::string > GetChoiceNames ()
 
ParameterGroup::Pointer GetChoiceParameterGroupByIndex (int i)
 
ParameterGroup::Pointer GetChoiceParameterGroupByKey (std::string choiceKey)
 
virtual const char * GetNameOfClass () const
 
unsigned int GetNbChoices (void)
 
std::vector< std::string > GetParametersKeys ()
 
ParameterType GetType () const override
 
virtual unsigned int GetValue () const
 
bool HasValue () const override
 
virtual void SetValue (std::string choiceKey)
 
virtual void SetValue (unsigned int v)
 
int ToInt () const override
 
std::string ToString () const override
 
- Public Member Functions inherited from otb::Wrapper::Parameter
virtual void SetName (const std::string &)
 
virtual const char * GetName () const
 
virtual void SetDescription (const std::string &)
 
virtual const std::string & GetDescription () const
 
virtual void SetKey (const std::string &)
 
virtual const char * GetKey () const
 
virtual void SetActive (bool flag)
 
bool GetActive (bool recurseParents=false) const
 
virtual void SetMandatory (bool flag)
 
virtual bool GetMandatory () const
 
virtual void MandatoryOn ()
 
virtual void MandatoryOff ()
 
virtual void SetAutomaticValue (bool flag)
 
virtual bool GetAutomaticValue () const
 
void AutomaticValueOn ()
 
void AutomaticValueOff ()
 
virtual void SetUserLevel (const UserLevel level)
 
virtual UserLevel GetUserLevel () const
 
virtual void SetRole (const Role role)
 
virtual Role GetRole () const
 
virtual void Reset ()
 
virtual bool HasUserValue () const
 
virtual void SetUserValue (bool isUserValue)
 
virtual void SetRoot (const Parameter::Pointer root)
 
virtual const Parameter::Pointer GetRoot () const
 
virtual bool IsRoot () const
 
virtual void AddChild (Parameter::Pointer child)
 
virtual std::vector< Parameter::PointerGetChildrenList ()
 
void TypeError (const std::string &target_type) const
 
virtual float ToFloat () const
 
virtual double ToDouble () const
 
virtual std::vector< std::string > ToStringList () const
 
virtual void FromFloat (float)
 
virtual void FromDouble (double)
 
virtual void FromStringList (const std::vector< std::string > &)
 

Static Public Member Functions

static Pointer New ()
 

Protected Types

typedef std::vector< ChoiceChoiceList
 

Protected Member Functions

 ChoiceParameter ()
 
 ~ChoiceParameter () override
 
- Protected Member Functions inherited from otb::Wrapper::Parameter
 Parameter ()
 

Protected Attributes

ChoiceList m_ChoiceList
 
unsigned int m_CurrentChoice
 
- Protected Attributes inherited from otb::Wrapper::Parameter
std::string m_Name
 
std::string m_Description
 
std::string m_Key
 
bool m_Mandatory
 
bool m_Active
 
bool m_UserValue
 
UserLevel m_UserLevel
 
Role m_Role
 
itk::WeakPointer< Parameterm_Root
 
std::vector< Parameter::Pointerm_ChildrenList
 

Private Member Functions

 ChoiceParameter (const ChoiceParameter &)=delete
 
void operator= (const ChoiceParameter &)=delete
 

Detailed Description

This class represent a multiple choice parameter for the wrapper framework.

Represents an enumerated parameter. The different values of the enumeration can be associated with a parameter

Definition at line 40 of file otbWrapperChoiceParameter.h.

Member Typedef Documentation

◆ ChoiceList

typedef std::vector<Choice> otb::Wrapper::ChoiceParameter::ChoiceList
protected

Definition at line 120 of file otbWrapperChoiceParameter.h.

◆ ConstPointer

typedef itk::SmartPointer<const Self> otb::Wrapper::ChoiceParameter::ConstPointer

Definition at line 47 of file otbWrapperChoiceParameter.h.

◆ Pointer

typedef itk::SmartPointer<Self> otb::Wrapper::ChoiceParameter::Pointer

Definition at line 46 of file otbWrapperChoiceParameter.h.

◆ Self

Standard class typedef

Definition at line 44 of file otbWrapperChoiceParameter.h.

◆ Superclass

Definition at line 45 of file otbWrapperChoiceParameter.h.

Constructor & Destructor Documentation

◆ ChoiceParameter() [1/2]

otb::Wrapper::ChoiceParameter::ChoiceParameter ( )
protected

Constructor

◆ ~ChoiceParameter()

otb::Wrapper::ChoiceParameter::~ChoiceParameter ( )
overrideprotected

Destructor

◆ ChoiceParameter() [2/2]

otb::Wrapper::ChoiceParameter::ChoiceParameter ( const ChoiceParameter )
privatedelete

Member Function Documentation

◆ AddChoice()

void otb::Wrapper::ChoiceParameter::AddChoice ( std::string  choicekey,
std::string  choiceName 
)

Add a value to the choice

◆ ClearValue()

void otb::Wrapper::ChoiceParameter::ClearValue ( )
overridevirtual

Name of the parameter

Reimplemented from otb::Wrapper::Parameter.

◆ CreateAnother()

virtual::itk::LightObject::Pointer otb::Wrapper::ChoiceParameter::CreateAnother ( void  ) const

◆ FromInt()

void otb::Wrapper::ChoiceParameter::FromInt ( int  )
overridevirtual

Name of the parameter

Reimplemented from otb::Wrapper::Parameter.

◆ FromString()

void otb::Wrapper::ChoiceParameter::FromString ( const std::string &  )
overridevirtual

Name of the parameter

Reimplemented from otb::Wrapper::Parameter.

◆ GetChoiceKey()

std::string otb::Wrapper::ChoiceParameter::GetChoiceKey ( int  i) const

Get the key of a specific choice value

◆ GetChoiceKeys()

std::vector<std::string> otb::Wrapper::ChoiceParameter::GetChoiceKeys ( )

Get the list of the different choice keys

◆ GetChoiceName()

std::string otb::Wrapper::ChoiceParameter::GetChoiceName ( int  i)

Get the long name of a specific choice value

◆ GetChoiceNames()

std::vector<std::string> otb::Wrapper::ChoiceParameter::GetChoiceNames ( )

Get the list of the different choice keys

◆ GetChoiceParameterGroupByIndex()

ParameterGroup::Pointer otb::Wrapper::ChoiceParameter::GetChoiceParameterGroupByIndex ( int  i)

Get the ParameterGroup associated to a choice value

◆ GetChoiceParameterGroupByKey()

ParameterGroup::Pointer otb::Wrapper::ChoiceParameter::GetChoiceParameterGroupByKey ( std::string  choiceKey)

Get the ParameterGroup associated to a choice value

◆ GetNameOfClass()

virtual const char* otb::Wrapper::ChoiceParameter::GetNameOfClass ( ) const
virtual

RTTI support

Reimplemented from otb::Wrapper::Parameter.

◆ GetNbChoices()

unsigned int otb::Wrapper::ChoiceParameter::GetNbChoices ( void  )

Get the number of available choice

◆ GetParametersKeys()

std::vector<std::string> otb::Wrapper::ChoiceParameter::GetParametersKeys ( )

Get all parameters that are child of this choice parameter

◆ GetType()

ParameterType otb::Wrapper::ChoiceParameter::GetType ( ) const
overridevirtual

Get the dynamic type as declared in WrapperTypes.h

Implements otb::Wrapper::Parameter.

◆ GetValue()

virtual unsigned int otb::Wrapper::ChoiceParameter::GetValue ( ) const
virtual

Return any value

◆ HasValue()

bool otb::Wrapper::ChoiceParameter::HasValue ( ) const
overridevirtual

Name of the parameter

Implements otb::Wrapper::Parameter.

◆ New()

static Pointer otb::Wrapper::ChoiceParameter::New ( )
static

Defining ::New() static method

◆ operator=()

void otb::Wrapper::ChoiceParameter::operator= ( const ChoiceParameter )
privatedelete

◆ SetValue() [1/2]

virtual void otb::Wrapper::ChoiceParameter::SetValue ( std::string  choiceKey)
virtual

Set choice value by its key

◆ SetValue() [2/2]

virtual void otb::Wrapper::ChoiceParameter::SetValue ( unsigned int  v)
virtual

Set choice value

◆ ToInt()

int otb::Wrapper::ChoiceParameter::ToInt ( ) const
overridevirtual

Parameter conversion functions. They are used by WrapperApplication to provide functions like SetParameterInt, GetParameterString, etc.

Reimplemented from otb::Wrapper::Parameter.

◆ ToString()

std::string otb::Wrapper::ChoiceParameter::ToString ( ) const
overridevirtual

Name of the parameter

Reimplemented from otb::Wrapper::Parameter.

Member Data Documentation

◆ m_ChoiceList

ChoiceList otb::Wrapper::ChoiceParameter::m_ChoiceList
protected

Definition at line 121 of file otbWrapperChoiceParameter.h.

◆ m_CurrentChoice

unsigned int otb::Wrapper::ChoiceParameter::m_CurrentChoice
protected

Definition at line 123 of file otbWrapperChoiceParameter.h.


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