Public Types | Public Member Functions | Static Public Attributes | Protected Attributes

mln::value::sign Class Reference

The sign class represents the value type composed by the set (-1, 0, 1) sign value type is a subset of the int value type. More...

#include <sign.hh>

Inheritance diagram for mln::value::sign:
Inheritance graph

List of all members.

Public Types

typedef Scalar< void > category
typedef int enc
 FIXME Are these typedefs correct?
typedef int equiv
 Define the equivalent type.
typedef sign exact_t

Public Member Functions

 operator int () const
 Conversion to an integer.
signoperator= (int i)
 Assignment from an integer.
 sign (int i)
 Constructor from an integer.
 sign ()
 Constructor without argument.
int val_ () const
 Return the value associated to the sign object.

 sign (const mln::literal::zero_t &)
 Constructors/assignments with literals.
signoperator= (const mln::literal::zero_t &)
 sign (const mln::literal::one_t &)
signoperator= (const mln::literal::one_t &)

Static Public Attributes

static const sign one = 1
 Unit value.
static const sign zero = 0
 Zero value.

Protected Attributes

int v_
 The value.

Detailed Description

The sign class represents the value type composed by the set (-1, 0, 1) sign value type is a subset of the int value type.


Member Typedef Documentation

typedef Scalar<void> mln::value::Scalar< sign >::category [inherited]

Reimplemented from mln::Value< sign >.

typedef int mln::value::sign::enc

FIXME Are these typedefs correct?

Define the encoding type

Define the equivalent type.

typedef sign mln::Object< sign >::exact_t [inherited]

Constructor & Destructor Documentation

mln::value::sign::sign (  )  [inline]

Constructor without argument.

mln::value::sign::sign ( int  i  )  [inline]

Constructor from an integer.

References v_.

mln::value::sign::sign ( const mln::literal::zero_t  )  [inline]

Constructors/assignments with literals.

References v_.

mln::value::sign::sign ( const mln::literal::one_t  )  [inline]

References v_.


Member Function Documentation

mln::value::sign::operator int (  )  const [inline]

Conversion to an integer.

References v_.

sign & mln::value::sign::operator= ( int  i  )  [inline]

Assignment from an integer.

References v_.

sign & mln::value::sign::operator= ( const mln::literal::one_t  )  [inline]

References v_.

sign & mln::value::sign::operator= ( const mln::literal::zero_t  )  [inline]

References v_.

int mln::value::sign::val_ (  )  const [inline]

Return the value associated to the sign object.

References v_.

Referenced by mln::value::operator<(), mln::value::operator<<(), and mln::value::operator==().


Member Data Documentation

const sign mln::value::sign::one = 1 [static]

Unit value.

int mln::value::sign::v_ [protected]

The value.

Referenced by operator int(), operator=(), sign(), and val_().

const sign mln::value::sign::zero = 0 [static]

Zero value.