GeoGen API Reference
Public Member Functions | List of all members
geogen::runtime::EnumScriptParameter Class Reference

Script parameter of type Enum. More...

Inherits geogen::runtime::ScriptParameter.

Public Member Functions

 EnumScriptParameter (String const &name, String const &label, String const &description, corelib::EnumTypeDefinition const *enumType, int defaultValue)
 Constructor. More...
 
 EnumScriptParameter (EnumScriptParameter const &)
 Copy constructor. More...
 
EnumScriptParameteroperator= (EnumScriptParameter const &)
 Assignment operator. More...
 
virtual ScriptParameterType GetType () const
 Gets the script parameter type. More...
 
corelib::EnumTypeDefinition const * GetEnumType () const
 Gets definition of the enum type. More...
 
int GetDefaultValue () const
 Gets the default value. More...
 
int GetValue () const
 Gets current value. More...
 
void SetValue (int value)
 Sets current value. More...
 
void SetValue (String value)
 Sets current value. More...
 
virtual bool EqualsTo (ScriptParameter const *other) const
 Compares this script parameter to another script parameter. More...
 
virtual void ResetToDefault ()
 Resets to default.
 
virtual ScriptParameterClone () const
 Makes a deep copy of this script parameter. More...
 
virtual void Serialize (IOStream &stream) const
 Writes the human readable string representation of this instance to the given stream. More...
 
- Public Member Functions inherited from geogen::runtime::ScriptParameter
virtual ~ScriptParameter ()
 Virtual destructor.
 
 ScriptParameter (String const &name, String const &label, String const &description)
 Constructor. More...
 
String GetName () const
 Gets the name. More...
 
String GetLabel () const
 Gets the label. More...
 
String GetDescription () const
 Gets the description. More...
 
- Public Member Functions inherited from geogen::Serializable
virtual void SerializeWithTabs (IOStream &stream, unsigned tabs) const
 Serialize with tabs. More...
 
String ToString () const
 Convert this instance into a human readable string representation. More...
 

Additional Inherited Members

- Protected Attributes inherited from geogen::runtime::ScriptParameter
String name
 
String label
 
String description
 

Detailed Description

Script parameter of type Enum.

Examples:
AdvancedScriptParameters.cpp.

Constructor & Destructor Documentation

EnumScriptParameter::EnumScriptParameter ( String const &  name,
String const &  label,
String const &  description,
corelib::EnumTypeDefinition const *  enumType,
int  defaultValue 
)

Constructor.

Parameters
nameThe name.
labelThe label.
descriptionThe description.
enumTypeType of the enum.
defaultValueThe default value.
EnumScriptParameter::EnumScriptParameter ( EnumScriptParameter const &  other)

Copy constructor.

Parameters
otherThe other.

Member Function Documentation

ScriptParameter * EnumScriptParameter::Clone ( ) const
virtual

Makes a deep copy of this script parameter.

Returns
The copy.

Implements geogen::runtime::ScriptParameter.

bool EnumScriptParameter::EqualsTo ( ScriptParameter const *  other) const
virtual

Compares this script parameter to another script parameter.

Parameters
otherThe other.
Returns
true if the two parameters are equal.

Implements geogen::runtime::ScriptParameter.

int geogen::runtime::EnumScriptParameter::GetDefaultValue ( ) const
inline

Gets the default value.

Returns
The default value.
corelib::EnumTypeDefinition const* geogen::runtime::EnumScriptParameter::GetEnumType ( ) const
inline

Gets definition of the enum type.

Returns
The type definition.
Examples:
AdvancedScriptParameters.cpp.
virtual ScriptParameterType geogen::runtime::EnumScriptParameter::GetType ( ) const
inlinevirtual

Gets the script parameter type.

Returns
The type.

Implements geogen::runtime::ScriptParameter.

int geogen::runtime::EnumScriptParameter::GetValue ( ) const
inline

Gets current value.

Returns
The value.
EnumScriptParameter & EnumScriptParameter::operator= ( EnumScriptParameter const &  other)

Assignment operator.

Parameters
otherThe other.
Returns
The copy.
void EnumScriptParameter::Serialize ( IOStream stream) const
virtual

Writes the human readable string representation of this instance to the given stream.

Parameters
streamThe stream.

Implements geogen::runtime::ScriptParameter.

void EnumScriptParameter::SetValue ( int  value)

Sets current value.

Parameters
valueThe value.
Examples:
AdvancedScriptParameters.cpp.
void EnumScriptParameter::SetValue ( String  value)

Sets current value.

Parameters
valueThe value.