.. oe:namespace:: OESystem



.. meta::
   :keywords: OEParameter, Parameter


.. _OESystem_OEParameter:

.. oe:class:: OEParameter

   .. oe:api::


      class OEParameter

   The :ref:`OEParameter <OESystem_OEParameter>` is an abstract base class. The parameters represent
   indivudual options in a :ref:`OEOptions <OESystem_OEOptions>` class, that can eventually translate
   to a parameter in a command-line interface application.

   The :ref:`OEParameter <OESystem_OEParameter>` class defines the following public methods:
    * :oe:meth:`AddAlias<OESystem::OEParameter::AddAlias>` and
      :oe:meth:`GetAliases<OESystem::OEParameter::GetAliases>` 
    * :oe:meth:`AddDetail<OESystem::OEParameter::AddDetail>` and
      :oe:meth:`GetDetail<OESystem::OEParameter::GetDetail>`
    * :oe:meth:`AddIllegalRange<OESystem::OEParameter::AddIllegalRange>` and
      :oe:meth:`GetIllegalRanges<OESystem::OEParameter::GetIllegalRanges>`
    * :oe:meth:`AddIllegalValue<OESystem::OEParameter::AddIllegalValue>` and
      :oe:meth:`GetIllegalValues<OESystem::OEParameter::GetIllegalValues>`
    * :oe:meth:`AddLegalRange<OESystem::OEParameter::AddLegalRange>` and
      :oe:meth:`GetLegalRanges<OESystem::OEParameter::GetLegalRanges>`
    * :oe:meth:`GetLegalValues<OESystem::OEParameter::GetLegalValues>` and
      :oe:meth:`GetPrettyLegalValues<OESystem::OEParameter::GetPrettyLegalValues>`
    * :oe:meth:`AddStringDefault<OESystem::OEParameter::AddStringDefault>` ,
      :oe:meth:`GetStringDefault<OESystem::OEParameter::GetStringDefault>` and
      :oe:meth:`GetStringDefaults<OESystem::OEParameter::GetStringDefaults>`
    * :oe:meth:`AddStringValue<OESystem::OEParameter::AddStringValue>` ,
      :oe:meth:`GetStringValue<OESystem::OEParameter::GetStringValue>` and
      :oe:meth:`GetStringValues<OESystem::OEParameter::GetStringValues>`
    * :oe:meth:`ClearDefaults<OESystem::OEParameter::ClearDefaults>`
    * :oe:meth:`ClearValues<OESystem::OEParameter::ClearValues>`
    * :oe:meth:`CreateCopy<OESystem::OEParameter::CreateCopy>`
    * :oe:meth:`GetBrief<OESystem::OEParameter::GetBrief>` and
      :oe:meth:`SetBrief<OESystem::OEParameter::SetBrief>`
    * :oe:meth:`GetHasDefault<OESystem::OEParameter::GetHasDefault>`
    * :oe:meth:`GetHasValue<OESystem::OEParameter::GetHasValue>`
    * :oe:meth:`GetIsList<OESystem::OEParameter::GetIsList>` and
      :oe:meth:`SetIsList<OESystem::OEParameter::SetIsList>`
    * :oe:meth:`GetKeyless<OESystem::OEParameter::GetKeyless>` and
      :oe:meth:`SetKeyless<OESystem::OEParameter::SetKeyless>`
    * :oe:meth:`GetName<OESystem::OEParameter::GetName>` and
      :oe:meth:`SetName<OESystem::OEParameter::SetName>`
    * :oe:meth:`GetOrderPriority<OESystem::OEParameter::GetOrderPriority>` and
      :oe:meth:`SetOrderPriority<OESystem::OEParameter::SetOrderPriority>`
    * :oe:meth:`GetVisibility<OESystem::OEParameter::GetVisibility>` and
      :oe:meth:`SetVisibility<OESystem::OEParameter::SetVisibility>`
    * :oe:meth:`IsLegalString<OESystem::OEParameter::IsLegalString>`
    * :oe:meth:`IsSet<OESystem::OEParameter::IsSet>` and
      :oe:meth:`IsSetToString<OESystem::OEParameter::IsSetToString>`


   The following classes derive from this class:
    * :ref:`OETypedParameter <OESystem_OETypedParameter>`
    * :ref:`OEPointerParameter <OESystem_OEPointerParameter>`
   


   ..  _OESystem_OEParameter_AddAlias:

   .. oe:method:: operator=
      :language: c++

      .. oe:api::

         OEParameter & operator=(const OEParameter &)

      Assignment operator.


   .. oe:method:: AddAlias


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool AddAlias(const std::string& alias)

      .. oe:language:: python

         .. oe:api:: python

            AddAlias(alias: str) -> bool

      Adds an 'alias' name for this parameter. The alias must be a single word and begin with 
      a ``'-'``. This function returns ``true`` if the alias is valid and the add succeeds.



   ..  _OESystem_OEParameter_AddDetail:



   .. oe:method:: AddDetail



      .. oe:language:: c++ java csharp

         .. oe:api::

            bool AddDetail(const std::string& detail)

      .. oe:language:: python

         .. oe:api:: python

            AddDetail(detail: str) -> bool

      Adds a line to the detailed description of the parameter. Return ``true`` if completed successfully.



   ..  _OESystem_OEParameter_AddIllegalRange:



   .. oe:method:: AddIllegalRange



      .. oe:language:: c++ java csharp

         .. oe:api::

            bool AddIllegalRange(const std::string& hi_val,
                                 const std::string& low_val)

      .. oe:language:: python

         .. oe:api:: python

            AddIllegalRange(hi: str, low: str) -> bool

      Adds an illegal range for this parameter in string format. This function succeeds and returns ``true`` 
      if the parameter can have illegal ranges.



   ..  _OESystem_OEParameter_AddIllegalValue:



   .. oe:method:: AddIllegalValue



      .. oe:language:: c++ java csharp

         .. oe:api::

            bool AddIllegalValue(const std::string& val)

      .. oe:language:: python

         .. oe:api:: python

            AddIllegalValue(val: str) -> bool

      Adds an illegal value in string format. This function succeeds and returns ``true`` if the parameter 
      can have illegal values.



   ..  _OESystem_OEParameter_AddLegalRange:



   .. oe:method:: AddLegalRange



      .. oe:language:: c++ java csharp

         .. oe:api::

            bool AddLegalRange(const std::string& hi_val,
                               const std::string& low_val)

      .. oe:language:: python

         .. oe:api:: python

            AddLegalRange(hi: str, low: str) -> bool

      Adds a legal range for the parameter in string format. This function succeeds and returns ``true`` 
      if the parameter can have legal ranges. 



   ..  _OESystem_OEParameter_AddLegalValue:

 

   .. oe:method:: AddLegalValue



      .. oe:language:: c++ java csharp

         .. oe:api::

            bool AddLegalValue(const std::string& val)

      .. oe:language:: python

         .. oe:api:: python

            AddLegalValue(val: str) -> bool

      Adds a legal value in string format. This function succeeds and returns ``true`` if the parameter 
      can have legal values.



   ..  _OESystem_OEParameter_AddStringDefault:



   .. oe:method:: AddStringDefault



      .. oe:language:: c++ java csharp

         .. oe:api::

            bool AddStringDefault(const std::string& string_default)

      .. oe:language:: python

         .. oe:api:: python

            AddStringDefault(value: str) -> bool

      Adds a default value in string format. This function succeeds and returns ``true`` if the default
      value can be set.


   ..  _OESystem_OEParameter_AddStringValue:



   .. oe:method:: AddStringValue



      .. oe:language:: c++ java csharp

         .. oe:api::

            bool AddStringValue(const std::string& string_value)

      .. oe:language:: python

         .. oe:api:: python

            AddStringValue(value: str) -> bool

      Adds a value for the parameter in string format. This function succeeds and returns ``true`` if the 
      value can be set.



   ..  _OESystem_OEParameter_ClearDefaults:



   .. oe:method:: ClearDefaults



      .. oe:language:: c++ java csharp

         .. oe:api::

            bool ClearDefaults()

      .. oe:language:: python

         .. oe:api:: python

            ClearDefaults() -> bool

      Clear all currently set default values. Returns ``true`` if done successfully.


   ..  _OESystem_OEParameter_ClearValues:



   .. oe:method:: ClearValues



      .. oe:language:: c++ java csharp

         .. oe:api::

            bool ClearValues()

      .. oe:language:: python

         .. oe:api:: python

            ClearValues() -> bool

      Clear all currently set parameter values. Returns ``true`` if done successfully.

   ..  _OESystem_OEParameter_CreateCopy:


   .. oe:method:: CreateCopy


      .. oe:language:: c++ java csharp

         .. oe:api::

            OEParameter* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEParameter

      Creates a copy of this :ref:`OEParameter <OESystem_OEParameter>` instance.

   ..  _OESystem_OEParameter_GetAliases:


   .. oe:method:: GetAliases


      .. oe:language:: c++ java csharp

         .. oe:api::

            OEIterBase<const std::string>* GetAliases() const

      .. oe:language:: python

         .. oe:api:: python

            GetAliases() -> Iterable[str]

      See :oe:meth:`AddAlias<OESystem::OEParameter::AddAlias>` method.

   ..  _OESystem_OEParameter_GetBrief:


   .. oe:method:: GetBrief


      .. oe:language:: c++ java csharp

         .. oe:api::

            std::string GetBrief() const

      .. oe:language:: python

         .. oe:api:: python

            GetBrief() -> str

      See :oe:meth:`SetBrief<OESystem::OEParameter::SetBrief>` method.

   ..  _OESystem_OEParameter_GetDetail:


   .. oe:method:: GetDetail


      .. oe:language:: c++ java csharp

         .. oe:api::

            OEIterBase<const std::string>* GetDetail() const

      .. oe:language:: python

         .. oe:api:: python

            GetDetail() -> Iterable[str]

      See :oe:meth:`AddDetail<OESystem::OEParameter::AddDetail>` method.

   ..  _OESystem_OEParameter_GetHasDefault:


   .. oe:method:: GetHasDefault


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool GetHasDefault(const unsigned idx = 0) const

      .. oe:language:: python

         .. oe:api:: python

            GetHasDefault(idx: int = 0) -> bool

      Returns ``true`` if a default value for the parameter is set.

   ..  _OESystem_OEParameter_GetHasValue:


   .. oe:method:: GetHasValue


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool GetHasValue(const unsigned idx = 0) const

      .. oe:language:: python

         .. oe:api:: python

            GetHasValue(idx: int = 0) -> bool

      Returns ``true`` if the value of the :ref:`OEParameter <OESystem_OEParameter>` object is set.

   ..  _OESystem_OEParameter_GetIllegalRanges:


   .. oe:method:: GetIllegalRanges


      .. oe:language:: c++ java csharp

         .. oe:api::

            OEIterBase<const std::pair<std::string, std::string> > * GetIllegalRanges() const

      .. oe:language:: python

         .. oe:api:: python

            GetIllegalRanges() -> Iterable[Tuple[str,str]]

      See :oe:meth:`AddIllegalRange<OESystem::OEParameter::AddIllegalRange>` method.

   ..  _OESystem_OEParameter_GetIllegalValues:


   .. oe:method:: GetIllegalValues


      .. oe:language:: c++ java csharp

         .. oe:api::

            OEIterBase<const std::string>* GetIllegalValues() const

      .. oe:language:: python

         .. oe:api:: python

            GetIllegalValues() -> Iterable[str]

      See :oe:meth:`AddIllegalValue<OESystem::OEParameter::AddIllegalValue>` method.

   ..  _OESystem_OEParameter_GetIsList:


   .. oe:method:: GetIsList


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool GetIsList() const

      .. oe:language:: python

         .. oe:api:: python

            GetIsList() -> bool

      See :oe:meth:`SetIsList<OESystem::OEParameter::SetIsList>` method.

   ..  _OESystem_OEParameter_GetKeyless:


   .. oe:method:: GetKeyless


      .. oe:language:: c++ java csharp

         .. oe:api::

            unsigned int GetKeyless() const

      .. oe:language:: python

         .. oe:api:: python

            GetKeyless() -> int

      See :oe:meth:`SetKeyless<OESystem::OEParameter::SetKeyless>` method.

   ..  _OESystem_OEParameter_GetLegalRanges:


   .. oe:method:: GetLegalRanges


      .. oe:language:: c++ java csharp

         .. oe:api::

            OEIterBase<const std::pair<std::string, std::string> > * GetLegalRanges() const

      .. oe:language:: python

         .. oe:api:: python

            GetLegalRanges() -> Iterable[Tuple[str,str]]

      Returns the legal ranges in string format.

   ..  _OESystem_OEParameter_GetLegalValues:


   .. oe:method:: GetLegalValues


      .. oe:language:: c++ java csharp

         .. oe:api::

            OEIterBase<const std::string>* GetLegalValues() const

      .. oe:language:: python

         .. oe:api:: python

            GetLegalValues() -> Iterable[str]

      Returns the legal values of the parameter in string format.

   ..  _OESystem_OEParameter_GetPrettyLegalValues:


   .. oe:method:: GetPrettyLegalValues


      .. oe:language:: c++ java csharp

         .. oe:api::

            OEIterBase<const std::string>* GetPrettyLegalValues() const

      .. oe:language:: python

         .. oe:api:: python

            GetPrettyLegalValues() -> Iterable[str]

      Returns the named legal values of the parameter in string format. This list of legal values may or may-not 
      be idential to the one obtained from :oe:meth:`GetLegalValues<OESystem::OEParameter::GetLegalValues>`,
      depending on the parameter type.  

   ..  _OESystem_OEParameter_GetName:
  

   .. oe:method:: GetName


      .. oe:language:: c++ java csharp

         .. oe:api::

            std::string GetName() const

      .. oe:language:: python

         .. oe:api:: python

            GetName() -> str

      See :oe:meth:`SetName<OESystem::OEParameter::SetName>` method.

   ..  _OESystem_OEParameter_GetOrderPriority:


   .. oe:method:: GetOrderPriority


      .. oe:language:: c++ java csharp

         .. oe:api::

            int GetOrderPriority() const

      .. oe:language:: python

         .. oe:api:: python

            GetOrderPriority() -> int

      See :oe:meth:`SetOrderPriority<OESystem::OEParameter::SetOrderPriority>` method.

   ..  _OESystem_OEParameter_GetRequired:


   .. oe:method:: GetRequired


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool GetRequired() const

      .. oe:language:: python

         .. oe:api:: python

            GetRequired() -> bool

      See :oe:meth:`SetRequired<OESystem::OEParameter::SetRequired>` method.

   ..  _OESystem_OEParameter_GetStringDefault:


   .. oe:method:: GetStringDefault


      .. oe:language:: c++ java csharp

         .. oe:api::

            std::string GetStringDefault(const unsigned idx = 0) const

      .. oe:language:: python

         .. oe:api:: python

            GetStringDefault(idx: int = 0) -> str

      Returns the string default of the parameter at the specified index. See 
      :oe:meth:`AddStringDefault<OESystem::OEParameter::AddStringDefault>` method.

   ..  _OESystem_OEParameter_GetStringDefaults:


   .. oe:method:: GetStringDefaults


      .. oe:language:: c++ java csharp

         .. oe:api::

            OEIterBase<const std::string>* GetStringDefaults() const

      .. oe:language:: python

         .. oe:api:: python

            GetStringDefaults() -> Iterable[str]

      See :oe:meth:`AddStringDefault<OESystem::OEParameter::AddStringDefault>` method.

   ..  _OESystem_OEParameter_GetStringValue:


   .. oe:method:: GetStringValue


      .. oe:language:: c++ java csharp

         .. oe:api::

            std::string GetStringValue(const unsigned idx = 0) const

      .. oe:language:: python

         .. oe:api:: python

            GetStringValue(idx: int = 0) -> str

      Returns the string value of the parameter at the specified index. See 
      :oe:meth:`AddStringValue<OESystem::OEParameter::AddStringValue>` method.

   ..  _OESystem_OEParameter_GetStringValues:


   .. oe:method:: GetStringValues


      .. oe:language:: c++ java csharp

         .. oe:api::

            OEIterBase<const std::string>* GetStringValues() const

      .. oe:language:: python

         .. oe:api:: python

            GetStringValues() -> Iterable[str]

      See :oe:meth:`AddStringValue<OESystem::OEParameter::AddStringValue>` method.

   ..  _OESystem_OEParameter_GetVisibility:


   .. oe:method:: GetVisibility


      .. oe:language:: c++ java csharp

         .. oe:api::

            unsigned int GetVisibility() const

      .. oe:language:: python

         .. oe:api:: python

            GetVisibility() -> int

      See :oe:meth:`SetVisibility<OESystem::OEParameter::SetVisibility>` method.

   ..  _OESystem_OEParameter_IsLegalString:


   .. oe:method:: IsLegalString


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool IsLegalString(const std::string& value) const

      .. oe:language:: python

         .. oe:api:: python

            IsLegalString(value: str) -> bool

      Returns if the specified value in the string format is a legal
      value. A setting is considered a legal value if it does not
      match and illegal value or fall within an illegal range (see
      :oe:meth:`OESystem::OEParameter::AddIllegalValue` and
      :oe:meth:`OESystem::OEParameter::AddIllegalRange` member
      functions of this class). Additionally if the parameter has at
      least one legal value or legal range the setting must match
      either a legal value or legal range.

   ..  _OESystem_OEParameter_IsSet:


   .. oe:method:: IsSet


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool IsSet(const unsigned idx = 0) const

      .. oe:language:: python

         .. oe:api:: python

            IsSet(idx: int = 0) -> bool

      Returns if the parameter current contains a setting, i.e., a default or an user-defined value. 

   ..  _OESystem_OEParameter_IsSetToString:
 

   .. oe:method:: IsSetToString


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool IsSetToString(const std::string& val) const

      .. oe:language:: python

         .. oe:api:: python

            IsSetToString(val: str) -> bool

      Returns if the parameters current setting (i.e., a default or an user-defined value) matches
      the specified string value.

   ..  _OESystem_OEParameter_Load:


   .. oe:method:: Load


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool Load()

      .. oe:language:: python

         .. oe:api:: python

            Load() -> bool

      Converts the string defaults and values of this parameter into actual defaults and values.
      This function will return ``false`` if the string defaults or values cannot be converted to the 
      actual defaults or values, as well as if the values do not satisfy the specified ranges.

   ..  _OESystem_OEParameter_LoadDefault:


   .. oe:method:: LoadDefault


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool LoadDefault()

      .. oe:language:: python

         .. oe:api:: python

            LoadDefault() -> bool

      Converts the string defaults of this parameter into actual defaults.
      This function will return ``false`` if the string defaults cannot be converted to the actual defaults,
      as well as if the default values do not satisfy the specified ranges.

   ..  _OESystem_OEParameter_LoadValue:


   .. oe:method:: LoadValue


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool LoadValue()

      .. oe:language:: python

         .. oe:api:: python

            LoadValue() -> bool

      Converts the user-defined string values of this parameter into actual values.
      This function will return ``false`` if the string values cannot be converted to the actual values,
      as well as if the values do not satisfy the specified ranges.

   ..  _OESystem_OEParameter_SetBrief:


   .. oe:method:: SetBrief


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool SetBrief(std::string brief)

      .. oe:language:: python

         .. oe:api:: python

            SetBrief(brief: str) -> bool

      Sets the brief description of the parameter.

   ..  _OESystem_OEParameter_SetIsList:


   .. oe:method:: SetIsList


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool SetIsList(bool is_list_parameter)

      .. oe:language:: python

         .. oe:api:: python

            SetIsList(isList: bool) -> bool

      Set if the parameter is a list parameter, i.e., if the parameters can value of list of defaults 
      or user-defined values. **Default: False**

   ..  _OESystem_OEParameter_SetKeyless:


   .. oe:method:: SetKeyless


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool SetKeyless(const unsigned keyless)

      .. oe:language:: python

         .. oe:api:: python

            SetKeyless(keyless: int) -> bool

      Sets the keyless setting of the parameter. To enable a prrameter to be keyless the entry must be a
      non-zero value.  A value of 0 (default) specifies the parameter to be not-keyless.
      **Default: 0**

   ..  _OESystem_OEParameter_SetName:


   .. oe:method:: SetName


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool SetName(std::string name)

      .. oe:language:: python

         .. oe:api:: python

            SetName(name: str) -> bool

      Sets the name of the parameter, which must be a single word and
      begin with ``'-'``. 

   ..  _OESystem_OEParameter_SetOrderPriority:
 

   .. oe:method:: SetOrderPriority


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool SetOrderPriority(int order)

      .. oe:language:: python

         .. oe:api:: python

            SetOrderPriority(order: int) -> bool

      Sets the order priority of the parameter, which is used to
      control the order parameters appear in help lists. **Default: 0**

   ..  _OESystem_OEParameter_SetRequired:


   .. oe:method:: SetRequired


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool SetRequired(bool required)

      .. oe:language:: python

         .. oe:api:: python

            SetRequired(required: bool) -> bool

      Sets the flag indicating if the parameter is required (i.e., must be guven a user-defined value).
      **Default: False**

   ..  _OESystem_OEParameter_SetStringDefault:


   .. oe:method:: SetStringDefault


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool SetStringDefault(const std::string& string_default)

      .. oe:language:: python

         .. oe:api:: python

            SetStringDefault(value: str) -> bool

      Sets the default value of the parameter as a string. This string
      default is not converted into the read default until the
      :oe:meth:`OESystem::OEParameter::LoadDefault` member function is
      called. **Default: None**

   ..  _OESystem_OEParameter_SetStringValue:


   .. oe:method:: SetStringValue


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool SetStringValue(const std::string& string_value)

      .. oe:language:: python

         .. oe:api:: python

            SetStringValue(value: str) -> bool

      Sets the value of the parameter as a string. This string value
      is not converted into the real value until
      the :oe:meth:`OESystem::OEParameter::LoadValue` member function is
      called. **Default: None**

   ..  _OESystem_OEParameter_SetVisibility:


   .. oe:method:: SetVisibility


      .. oe:language:: c++ java csharp

         .. oe:api::

            bool SetVisibility(const unsigned visibility)

      .. oe:language:: python

         .. oe:api:: python

            SetVisibility(visibility: int) -> bool

      Sets the visibility of the parameter. Valid settings are defined in the :oe:constns:`OESystem::OEParamVisibility` namespace. 
      ** Default :oe:const:`OESystem::OEParamVisibility::Simple` **
