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

Script parameter of type Number. More...

Inherits geogen::runtime::ScriptParameter.

Public Member Functions

 NumberScriptParameter (String const &name, String const &label, String const &description, Number defaultValue, Number min, Number max, ScriptParameterValueRestriction restriction)
 Constructor. More...
 
 NumberScriptParameter (NumberScriptParameter const &other)
 Copy constructor. More...
 
NumberScriptParameteroperator= (NumberScriptParameter const &other)
 Assignment operator. More...
 
virtual ScriptParameterType GetType () const
 Gets the script parameter type. More...
 
Number GetDefaultValue () const
 Gets default value. More...
 
Number GetValue () const
 Gets the current value. More...
 
Number GetMin () const
 Gets the minimum. More...
 
Number GetMax () const
 Gets the maximum. More...
 
ScriptParameterValueRestriction GetRestriction () const
 Gets the value restriction. More...
 
void SetValue (Number value)
 Sets the 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 Number.

Examples:
AdvancedScriptParameters.cpp, and ScriptParameters.cpp.

Constructor & Destructor Documentation

NumberScriptParameter::NumberScriptParameter ( String const &  name,
String const &  label,
String const &  description,
Number  defaultValue,
Number  min,
Number  max,
ScriptParameterValueRestriction  restriction 
)

Constructor.

Parameters
nameThe name.
labelThe label.
descriptionThe description.
defaultValueThe default value.
minThe minimum.
maxThe maximum.
restrictionThe restriction.
NumberScriptParameter::NumberScriptParameter ( NumberScriptParameter const &  other)

Copy constructor.

Parameters
otherThe other.

Member Function Documentation

ScriptParameter * NumberScriptParameter::Clone ( ) const
virtual

Makes a deep copy of this script parameter.

Returns
The copy.

Implements geogen::runtime::ScriptParameter.

bool NumberScriptParameter::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.

Number geogen::runtime::NumberScriptParameter::GetDefaultValue ( ) const
inline

Gets default value.

Returns
The default value.
Number geogen::runtime::NumberScriptParameter::GetMax ( ) const
inline

Gets the maximum.

Returns
The maximum value.
Examples:
AdvancedScriptParameters.cpp.
Number geogen::runtime::NumberScriptParameter::GetMin ( ) const
inline

Gets the minimum.

Returns
The minimum value.
Examples:
AdvancedScriptParameters.cpp.
ScriptParameterValueRestriction geogen::runtime::NumberScriptParameter::GetRestriction ( ) const
inline

Gets the value restriction.

Returns
The value restriction.
virtual ScriptParameterType geogen::runtime::NumberScriptParameter::GetType ( ) const
inlinevirtual

Gets the script parameter type.

Returns
The type.

Implements geogen::runtime::ScriptParameter.

Number geogen::runtime::NumberScriptParameter::GetValue ( ) const
inline

Gets the current value.

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

Assignment operator.

Parameters
otherThe other.
Returns
This instance.
void NumberScriptParameter::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 NumberScriptParameter::SetValue ( Number  value)

Sets the value.

Parameters
valueThe value.
Examples:
AdvancedScriptParameters.cpp.