- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# OtherConstraintOption Class Reference

the OtherConstraintOption class. More...

`#include <OSOption.h>`

Collaboration diagram for OtherConstraintOption:

[legend]
List of all members.

## Public Member Functions
| OtherConstraintOption ()
| Default constructor.
| ~OtherConstraintOption ()
| Class destructor.
bool | IsEqual (OtherConstraintOption *that)
| A function to check for the equality of two objects.
bool | setRandom (double density, bool conformant)
| A function to make a random instance of this class.
bool | setCon (int numberOfCon, OtherConOption **con)
| A function to set an array of <con> elements.
bool | addCon (int idx, std::string value, std::string lbValue, std::string ubValue)
| A function to add a <con> element.
## Public Attributes
int | numberOfCon
| number of <con> children
int | numberOfEnumerations
| number of <enumeration> child elements
std::string | name
| name of the option
std::string | value
| value of the option
std::string | solver
| name of the solver to which this option applies
std::string | category
| name of the category into which this option falls
std::string | type
| type of the option value (integer, double, boolean, string)
std::string | description
| description of the option
OtherConOption ** | con
| array of option values
OtherOptionEnumeration ** | enumeration

## Detailed Description

the OtherConstraintOption class.

Author:
  Robert Fourer, Gus Gassmann, Jun Ma, Kipp Martin

Version:
  1.0, 21/07/2008

Since:
  OS 1.1

Remarks:
  A data structure class that corresponds to an xml element in the OSoL schema.

Definition at line 2651 of file OSOption.h.

## Constructor & Destructor Documentation

OtherConstraintOption::OtherConstraintOption | ( |  | ) |

Default constructor.

Definition at line 1050 of file OSOption.cpp.

References con, and enumeration.

OtherConstraintOption::~OtherConstraintOption | ( |  | ) |

Class destructor.

Definition at line 1067 of file OSOption.cpp.

References con, enumeration, numberOfCon, and numberOfEnumerations.

## Member Function Documentation

bool OtherConstraintOption::IsEqual | ( | OtherConstraintOption * | that | ) |

A function to check for the equality of two objects.

Definition at line 10010 of file OSOption.cpp.

References category, con, description, name, numberOfCon, solver, type, and value.

bool OtherConstraintOption::setRandom | ( | double | density,
|  | bool | conformant |
| ) |  |  |

A function to make a random instance of this class.

Parameters:

  | density,: | corresponds to the probability that a particular child element is created
  | conformant,: | if true enforces side constraints not enforceable in the schema (e.g., agreement of "numberOfXXX" atrbutes and <XXX> children)

Definition at line 11182 of file OSOption.cpp.

References category, con, description, enumeration, name, numberOfCon, numberOfEnumerations, OSRand(), OtherOptionEnumeration::setRandom(), OtherConOption::setRandom(), solver, type, and value.

Referenced by ConstraintOption::setRandom().

bool OtherConstraintOption::setCon | ( | int | numberOfCon,
|  | OtherConOption ** | con |
| ) |  |  |

A function to set an array of <con> elements.

Parameters:

  | numberOfCon,: | number of <con> elements to be set
  | obj,: | the array of <con> elements that are to be set

Definition at line 5867 of file OSOption.cpp.

References con, and ErrorClass::errormsg.

bool OtherConstraintOption::addCon | ( | int | idx,
|  | std::string | value,
|  | std::string | lbValue,
|  | std::string | ubValue |
| ) |  |  |

A function to add a <con> element.

Parameters:

  | idx,: | the index of the constraint
  | value,: | the value associated with this constraint
  | lbValue,: | a lower bound associated with this constraint
  | ubValue,: | an upper bound associated with this constraint

Definition at line 5902 of file OSOption.cpp.

References con, ErrorClass::errormsg, OtherConOption::idx, OtherConOption::lbValue, numberOfCon, OtherConOption::ubValue, and OtherConOption::value.

## Member Data Documentation

int OtherConstraintOption::numberOfCon

number of <con> children

Definition at line 2655 of file OSOption.h.

Referenced by addCon(), ConstraintOption::addOther(), IsEqual(), ConstraintOption::setOther(), OSOption::setOtherConstraintOptionAttributes(), OSOption::setOtherConstraintOptionCon(), setRandom(), and ~OtherConstraintOption().

int OtherConstraintOption::numberOfEnumerations

number of <enumeration> child elements

Definition at line 2658 of file OSOption.h.

Referenced by ConstraintOption::addOther(), ConstraintOption::setOther(), OSOption::setOtherConstraintOptionAttributes(), OSOption::setOtherOptionEnumeration(), setRandom(), and ~OtherConstraintOption().

std::string OtherConstraintOption::name

name of the option

Definition at line 2661 of file OSOption.h.

Referenced by ConstraintOption::addOther(), IsEqual(), ConstraintOption::setOther(), OSOption::setOtherConstraintOptionAttributes(), and setRandom().

std::string OtherConstraintOption::value

value of the option

Definition at line 2664 of file OSOption.h.

Referenced by ConstraintOption::addOther(), IsEqual(), ConstraintOption::setOther(), OSOption::setOtherConstraintOptionAttributes(), and setRandom().

std::string OtherConstraintOption::solver

name of the solver to which this option applies

Definition at line 2667 of file OSOption.h.

Referenced by ConstraintOption::addOther(), IsEqual(), ConstraintOption::setOther(), OSOption::setOtherConstraintOptionAttributes(), and setRandom().

std::string OtherConstraintOption::category

name of the category into which this option falls

Definition at line 2670 of file OSOption.h.

Referenced by ConstraintOption::addOther(), IsEqual(), ConstraintOption::setOther(), OSOption::setOtherConstraintOptionAttributes(), and setRandom().

std::string OtherConstraintOption::type

type of the option value (integer, double, boolean, string)

Definition at line 2673 of file OSOption.h.

Referenced by ConstraintOption::addOther(), IsEqual(), ConstraintOption::setOther(), OSOption::setOtherConstraintOptionAttributes(), and setRandom().

std::string OtherConstraintOption::description

description of the option

Definition at line 2676 of file OSOption.h.

Referenced by ConstraintOption::addOther(), IsEqual(), ConstraintOption::setOther(), OSOption::setOtherConstraintOptionAttributes(), and setRandom().

OtherConOption** OtherConstraintOption::con

array of option values

Definition at line 2679 of file OSOption.h.

Referenced by addCon(), ConstraintOption::addOther(), IsEqual(), OtherConstraintOption(), setCon(), ConstraintOption::setOther(), OSOption::setOtherConstraintOptionAttributes(), OSOption::setOtherConstraintOptionCon(), setRandom(), and ~OtherConstraintOption().

OtherOptionEnumeration** OtherConstraintOption::enumeration

Definition at line 2685 of file OSOption.h.

Referenced by ConstraintOption::addOther(), OtherConstraintOption(), ConstraintOption::setOther(), OSOption::setOtherConstraintOptionAttributes(), OSOption::setOtherOptionEnumeration(), setRandom(), and ~OtherConstraintOption().

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

- /home/coin/SVN-release/OS-2.3.5/OS/src/OSCommonInterfaces/OSOption.h
- /home/coin/SVN-release/OS-2.3.5/OS/src/OSCommonInterfaces/OSOption.cpp