class Siena::AttributeConstraint

Siena C++ API documentation.

## class AttributeConstraint: public AttributeValue

> attribute constraint

## Inheritance:

### Public Fields

SienaOperator op
  the constraint operator

### Public Methods

AttributeConstraint()
  default constructor
AttributeConstraint(const AttributeValue & v)
  construct from an `AttributeValue`
AttributeConstraint(const AttributeValue & v, SienaOperator o)
  construct from an `AttributeValue` and a `SienaOperator`
AttributeConstraint(const AttributeConstraint & c)
  copy constructor
AttributeConstraint& operator = (const AttributeConstraint & c)
  copy assignment
AttributeConstraint& operator = (const AttributeValue & v)
  assignment from an `AttributeValue`
bool apply_to(const AttributeValue & v)
  applies `this` constraint to an attribute value

### Inherited from AttributeValue:

### Public

Constructors

Access functions

Assignment operators

## Documentation

> An `AttributeConstraint` represents a condition posed on an attribute value. It stores an operator plus a comparison value.

`SienaOperator op`
  the constraint operator

`AttributeConstraint()`
  `op` defaults to `Siena_eq`, the comparison value is null.

`AttributeConstraint(const AttributeValue & v)`
  `op` defaults to `Siena_eq`, the comparison value is initialized with `v`.
  Parameters:
    v - initializes the comparison value

`AttributeConstraint(const AttributeValue & v, SienaOperator o)`
  construct from an `AttributeValue` and a `SienaOperator`
  Parameters:
    v - initializes the comparison value
    o - initializes the operator `op`

`AttributeConstraint(const AttributeConstraint & c)`
  copy constructor

`AttributeConstraint& operator = (const AttributeConstraint & c)`
  copy assignment

`AttributeConstraint& operator = (const AttributeValue & v)`
  assigns the comparison value using `Siena_eq` as the comparison operator
  Parameters:
    v - comparison value

`bool apply_to(const AttributeValue & v)`
  applies `this` constraint to an attribute value
  Parameters:
    v - value to verify against `this` constraint

This class has no child classes.

See Also:
  AttributeValue

Alphabetic index HTML hierarchy of classes or Java

This document is part of Siena. Please, direct any comment or suggestion to Antonio Carzaniga