Mercury library  1.0
Translation of CFG grammars into an object model (Bachelor's thesis).
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions | Properties | List of all members
Mercury.Interpreting.ConstantParameter Class Reference

Constant parameter. More...

Inheritance diagram for Mercury.Interpreting.ConstantParameter:
Mercury.Interpreting.IFormalParameter

Public Member Functions

 ConstantParameter (object value, ParameterType type)
 Creates a new ConstantParameter instance. More...
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 
bool Equals (ConstantParameter other)
 

Static Public Member Functions

static ConstantParameter IntegralParameter (int value)
 Creates a new integral constant parameter. More...
 
static ConstantParameter RealParameter (double value)
 Creates a new real constant parameter. More...
 
static ConstantParameter BooleanParameter (bool value)
 Creates a new boolean constant parameter More...
 
static ConstantParameter StringParameter (string value)
 Creates a new string constant parameter. More...
 
static ConstantParameter AutoCreate (string value)
 Tries to parse the string value and infers its type. More...
 

Properties

object Value [get, set]
 Value of this constant More...
 
ParameterType Type [get, set]
 
- Properties inherited from Mercury.Interpreting.IFormalParameter
ParameterType Type [get]
 Formal parameter type. More...
 

Detailed Description

Constant parameter.

Definition at line 43 of file FormalParameter.cs.

Constructor & Destructor Documentation

Mercury.Interpreting.ConstantParameter.ConstantParameter ( object  value,
ParameterType  type 
)

Creates a new ConstantParameter instance.

Parameters
valueThe value of this constant.
typeParameter type.
Exceptions
System.ArgumentNullExceptionWhen value is null.

Definition at line 53 of file FormalParameter.cs.

Member Function Documentation

static ConstantParameter Mercury.Interpreting.ConstantParameter.AutoCreate ( string  value)
static

Tries to parse the string value and infers its type.

Parameters
valueString constant value.
Returns
A constant parameter.

Definition at line 98 of file FormalParameter.cs.

static ConstantParameter Mercury.Interpreting.ConstantParameter.BooleanParameter ( bool  value)
static

Creates a new boolean constant parameter

Parameters
valueThe value.
Returns
The constant parameter.

Definition at line 84 of file FormalParameter.cs.

override bool Mercury.Interpreting.ConstantParameter.Equals ( object  obj)

Definition at line 117 of file FormalParameter.cs.

bool Mercury.Interpreting.ConstantParameter.Equals ( ConstantParameter  other)

Definition at line 141 of file FormalParameter.cs.

override int Mercury.Interpreting.ConstantParameter.GetHashCode ( )

Definition at line 123 of file FormalParameter.cs.

static ConstantParameter Mercury.Interpreting.ConstantParameter.IntegralParameter ( int  value)
static

Creates a new integral constant parameter.

Parameters
valueThe value.
Returns
The constant parameter.

Definition at line 72 of file FormalParameter.cs.

static ConstantParameter Mercury.Interpreting.ConstantParameter.RealParameter ( double  value)
static

Creates a new real constant parameter.

Parameters
valueThe value.
Returns
The constant parameter.

Definition at line 78 of file FormalParameter.cs.

static ConstantParameter Mercury.Interpreting.ConstantParameter.StringParameter ( string  value)
static

Creates a new string constant parameter.

Parameters
valueThe value.
Returns
The constant parameter.

Definition at line 90 of file FormalParameter.cs.

override string Mercury.Interpreting.ConstantParameter.ToString ( )

Definition at line 126 of file FormalParameter.cs.

Property Documentation

ParameterType Mercury.Interpreting.ConstantParameter.Type
getset

Definition at line 135 of file FormalParameter.cs.

object Mercury.Interpreting.ConstantParameter.Value
getset

Value of this constant

Definition at line 64 of file FormalParameter.cs.


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