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.

Definition at line 49 of file value/sign.hh.


Member Typedef Documentation

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

Reimplemented from mln::Value< sign >.

Definition at line 57 of file concept/scalar.hh.

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

FIXME Are these typedefs correct?

Define the encoding type

Definition at line 55 of file value/sign.hh.

Define the equivalent type.

Definition at line 58 of file value/sign.hh.

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

Definition at line 173 of file object.hh.


Constructor & Destructor Documentation

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

Constructor without argument.

Definition at line 119 of file value/sign.hh.

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

Constructor from an integer.

Definition at line 137 of file value/sign.hh.

References v_.

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

Constructors/assignments with literals.

Definition at line 155 of file value/sign.hh.

References v_.

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

Definition at line 169 of file value/sign.hh.

References v_.


Member Function Documentation

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

Conversion to an integer.

Definition at line 124 of file value/sign.hh.

References v_.

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

Assignment from an integer.

Definition at line 146 of file value/sign.hh.

References v_.

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

Definition at line 176 of file value/sign.hh.

References v_.

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

Definition at line 162 of file value/sign.hh.

References v_.

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

Return the value associated to the sign object.

Definition at line 131 of file value/sign.hh.

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.

Definition at line 88 of file value/sign.hh.

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

The value.

Definition at line 93 of file value/sign.hh.

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

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

Zero value.

Definition at line 85 of file value/sign.hh.