Siena Simplification Library Documentation (v. 1.1.5) |
Class that implements siena::constraint
.
More...
#include <ssimp_types.h>
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 Constraint & | operator= (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. |
Class that implements siena::constraint
.
siena::bool_t ssimp::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 ssimp::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 ssimp::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 ssimp::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 ssimp::Constraint::operator< | ( | const Constraint & | c | ) | const [inline] |
Less-than operator.
Compares the constraints using name, then operator_id, then value.
bool ssimp::Constraint::operator== | ( | const Constraint & | c | ) | const [inline] |
Equals operator.
Returns true if both constraints have the same name, operator, and value.
siena::string_t ssimp::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.
Copyright © 2001-2004 University of Colorado.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This documentation is authored and maintained by Matthew J. Rutherford |