GeoGen API Reference
Public Member Functions | Protected Attributes | List of all members
geogen::runtime::ScriptParameter Class Referenceabstract

Base class for classes representing individual types of script parameters. More...

Inherits geogen::Serializable.

Inherited by geogen::runtime::BooleanScriptParameter, geogen::runtime::EnumScriptParameter, and geogen::runtime::NumberScriptParameter.

Public Member Functions

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...
 
virtual ScriptParameterType GetType () const =0
 Gets the script parameter type. More...
 
virtual void ResetToDefault ()=0
 Resets to default.
 
virtual bool EqualsTo (ScriptParameter const *other) const =0
 Compares this script parameter to another script parameter. More...
 
virtual ScriptParameterClone () const =0
 Makes a deep copy of this script parameter. More...
 
virtual void Serialize (IOStream &stream) const =0
 Writes the human readable string representation of this instance to the given stream. 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...
 

Protected Attributes

String name
 
String label
 
String description
 

Detailed Description

Base class for classes representing individual types of script parameters.

Constructor & Destructor Documentation

geogen::runtime::ScriptParameter::ScriptParameter ( String const &  name,
String const &  label,
String const &  description 
)
inline

Constructor.

Parameters
nameThe parameter name.
labelThe user friendly label.
descriptionThe description.

Member Function Documentation

virtual ScriptParameter* geogen::runtime::ScriptParameter::Clone ( ) const
pure virtual

Makes a deep copy of this script parameter.

Returns
The copy.

Implemented in geogen::runtime::NumberScriptParameter, geogen::runtime::EnumScriptParameter, and geogen::runtime::BooleanScriptParameter.

virtual bool geogen::runtime::ScriptParameter::EqualsTo ( ScriptParameter const *  other) const
pure virtual

Compares this script parameter to another script parameter.

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

Implemented in geogen::runtime::NumberScriptParameter, geogen::runtime::EnumScriptParameter, and geogen::runtime::BooleanScriptParameter.

String geogen::runtime::ScriptParameter::GetDescription ( ) const
inline

Gets the description.

Returns
The description.
String geogen::runtime::ScriptParameter::GetLabel ( ) const
inline

Gets the label.

Returns
The label.
String geogen::runtime::ScriptParameter::GetName ( ) const
inline

Gets the name.

Returns
The name.
virtual ScriptParameterType geogen::runtime::ScriptParameter::GetType ( ) const
pure virtual
virtual void geogen::runtime::ScriptParameter::Serialize ( IOStream stream) const
pure virtual

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

Parameters
streamThe stream.

Implements geogen::Serializable.

Implemented in geogen::runtime::NumberScriptParameter, geogen::runtime::EnumScriptParameter, and geogen::runtime::BooleanScriptParameter.