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

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

# TimeSpan Class Reference

the TimeSpan class. More...

`#include <OSGeneral.h>`

Inheritance diagram for TimeSpan:

[legend]
Collaboration diagram for TimeSpan:

[legend]
List of all members.

## Public Member Functions
| TimeSpan ()
| Default constructor.
| ~TimeSpan ()
| Class destructor.
bool | IsEqual (TimeSpan *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.
## Public Attributes
std::string | unit
| the unit in which time is measured
double | value
| the number of units

## Detailed Description

the TimeSpan class.

Author:
  Gus Gassmann, Jun Ma, Kipp Martin

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

Definition at line 801 of file OSGeneral.h.

## Constructor & Destructor Documentation

TimeSpan::TimeSpan | ( |  | ) |

Default constructor.

Definition at line 1195 of file OSGeneral.cpp.

TimeSpan::~TimeSpan | ( |  | ) |

Class destructor.

Definition at line 1201 of file OSGeneral.cpp.

## Member Function Documentation

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

A function to check for the equality of two objects.

Definition at line 1208 of file OSGeneral.cpp.

References isEqual(), unit, and value.

bool TimeSpan::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" attributes and <XXX> children)

Reimplemented in TimeMeasurement.

Definition at line 1245 of file OSGeneral.cpp.

References OSRand(), unit, and value.

Referenced by JobOption::setRandom().

## Member Data Documentation

std::string TimeSpan::unit

the unit in which time is measured

Definition at line 805 of file OSGeneral.h.

Referenced by OSResult::addTimingInformation(), OSOption::getMaxTimeUnit(), IsEqual(), OSOption::setMaxTime(), OSOption::setMaxTimeUnit(), setRandom(), OSResult::setTimingInformation(), and OSrLWriter::writeOSrL().

double TimeSpan::value

the number of units

Definition at line 808 of file OSGeneral.h.

Referenced by OSResult::addTimingInformation(), OSOption::getMaxTime(), OSResult::getTimeValue(), IsEqual(), OSOption::setMaxTime(), setRandom(), OSResult::setTimingInformation(), and OSrLWriter::writeOSrL().

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

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