DotNX::Core::Code< RepresentationType, ConcreteType > Class Template Reference

Supports the use of specific values as conventional codes. More...

Inheritance diagram for DotNX::Core::Code< RepresentationType, ConcreteType >:

IEquatable DotNX::Ftp::Representation DotNX::Ftp::TransferMode

List of all members.

Public Member Functions

 Code (RepresentationType v, params RepresentationType[] validValues)
 Constructor.
 Code (RepresentationType v, ICollection< RepresentationType > validValues)
override string ToString ()
 Conversion to string.
bool Equals (Code< RepresentationType, ConcreteType > other)
 Equality comparison.
override bool Equals (object other)
override int GetHashCode ()
 Hash code getter.

Static Public Member Functions

static bool operator== (Code< RepresentationType, ConcreteType > first, Code< RepresentationType, ConcreteType > second)
 Equality operator.
static bool operator!= (Code< RepresentationType, ConcreteType > first, Code< RepresentationType, ConcreteType > second)
 Inequality operator.

Properties

RepresentationType Value [get]
 The underlying value.


Detailed Description

template<RepresentationType, ConcreteType>
class DotNX::Core::Code< RepresentationType, ConcreteType >

Supports the use of specific values as conventional codes.

Template Parameters:
RepresentationType The underlying representation type from which values are drawn.
ConcreteType The actual type that derives from Code. Used to disambiguate between different specializations of Code with the same representation type.

Constructor & Destructor Documentation

template<RepresentationType , ConcreteType >
DotNX::Core::Code< RepresentationType, ConcreteType >::Code ( RepresentationType  v,
params RepresentationType[]  validValues 
)

Constructor.

Ensures that the argument is a valid value. Although it may seem wasteful to specify valid values in the constructor call, derived classes usually have only one such constructor, which is the only place where these values are actually explicitly mentioned.

Parameters:
v The conventional value.
validValues The collection of valid values.

template<RepresentationType , ConcreteType >
DotNX::Core::Code< RepresentationType, ConcreteType >::Code ( RepresentationType  v,
ICollection< RepresentationType >  validValues 
)


Member Function Documentation

template<RepresentationType , ConcreteType >
override string DotNX::Core::Code< RepresentationType, ConcreteType >::ToString (  ) 

Conversion to string.

Returns:
The conversion that applies to the instance's value.

template<RepresentationType , ConcreteType >
bool DotNX::Core::Code< RepresentationType, ConcreteType >::Equals ( Code< RepresentationType, ConcreteType >  other  ) 

Equality comparison.

Parameters:
other The Code to be compared.
Returns:
true if the instance and the argument are equal, false otherwise.

template<RepresentationType , ConcreteType >
override bool DotNX::Core::Code< RepresentationType, ConcreteType >::Equals ( object  other  ) 

template<RepresentationType , ConcreteType >
override int DotNX::Core::Code< RepresentationType, ConcreteType >::GetHashCode (  ) 

Hash code getter.

Returns:
The value's hash code.

template<RepresentationType , ConcreteType >
static bool DotNX::Core::Code< RepresentationType, ConcreteType >::operator== ( Code< RepresentationType, ConcreteType >  first,
Code< RepresentationType, ConcreteType >  second 
) [static]

Equality operator.

Parameters:
first A Code instance.
second Another Code instance.
Returns:
true if the arguments are equal, false otherwise.

template<RepresentationType , ConcreteType >
static bool DotNX::Core::Code< RepresentationType, ConcreteType >::operator!= ( Code< RepresentationType, ConcreteType >  first,
Code< RepresentationType, ConcreteType >  second 
) [static]

Inequality operator.

Parameters:
first A Code instance.
second Another Code instance.
Returns:
true if the arguments differ, false otherwise.


Property Documentation

template<RepresentationType , ConcreteType >
RepresentationType DotNX::Core::Code< RepresentationType, ConcreteType >::Value [get]

The underlying value.


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

SourceForge.net Logo
Generated on Sat Oct 18 14:13:25 2008 for .Nick's 0.1.0 by  doxygen 1.5.7.1