Siena Simplification Library Documentation (v. 1.1.4)

Constraint Class Reference

Class that implements siena::constraint. More...

#include <ssimp_types.h>

List of all members.

Public Member Functions

 Constraint (const std::string &name, siena::operator_id op, siena::bool_t b)
 Constructs a boolean valued constraint with the specified name and operator.
 Constraint (const std::string &name, siena::operator_id op, siena::double_t d)
 Constructs a real valued constraint with the specified name and operator.
 Constraint (const std::string &name, siena::operator_id op, siena::int_t i)
 Constructs a integer valued constraint with the specified name and operator.
 Constraint (const std::string &name, siena::operator_id op, const std::string &s)
 Constructs a string valued constraint with the specified name and operator.
 Constraint (const std::string &name)
 Constructs a constraint with the ANY operator.
 Constraint (const Constraint &c)
 Copy constructor.
const Constraintoperator= (const Constraint &c)
 Assignment operator.
bool operator== (const Constraint &c) const
 Equals operator.
bool operator< (const Constraint &c) const
 Less-than operator.
siena::bool_t bool_value () const
 Returns the constraint's boolean value.
siena::double_t double_value () const
 Returns the constraint's double value.
size_t bytesize () const
 Returns the size of the constraint's payload in bytes.
siena::int_t int_value () const
 Returns the constraint's integer value.
siena::string_t name () const
 Returns the constraint's name.
siena::operator_id op () const
 Returns the constraint's operator.
std::ostream & sff (std::ostream &out) const
 outputs constraint in a close approximation to the sff input language.
std::string str () const
 Returns a formatted representation of the constraint. This is intended to mostly be used for debugging and logging.
siena::string_t string_value () const
 Returns the constraint's string value.
siena::type_id type () const
 Returns the constraint's type.


Detailed Description

Class that implements siena::constraint.


Member Function Documentation

siena::bool_t Constraint::bool_value  )  const [inline]
 

Returns the constraint's boolean value.

If the constraint is not of type siena::bool_id then the results are undefined.

size_t Constraint::bytesize  )  const [inline]
 

Returns the size of the constraint's payload in bytes.

This is defined as the number of characters in the constraint's name, plus the sizeof( siena::operator_id ), plus the size of the value.

siena::double_t Constraint::double_value  )  const [inline]
 

Returns the constraint's double value.

If the constraint is not of type siena::double_id then the results are undefined.

siena::int_t Constraint::int_value  )  const [inline]
 

Returns the constraint's integer value.

If the constraint is not of type siena::int_id then the results are undefined.

bool Constraint::operator< const Constraint c  )  const [inline]
 

Less-than operator.

Compares the constraints using name, then operator_id, then value.

bool Constraint::operator== const Constraint c  )  const [inline]
 

Equals operator.

Returns true if both constraints have the same name, operator, and value.

siena::string_t Constraint::string_value  )  const [inline]
 

Returns the constraint's string value.

If the constraint is not of type siena::string_id then the results are undefined.


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