It describes a sequence (a number generator). More...
#include <Sequence.h>
Public Member Functions | |
Sequence * | clone () |
It returns a clone of the object. More... | |
boost::int64_t | getCachedValues () const |
It returns how many sequence numbers are preallocated. More... | |
DataSourceCatalog * | getCatalog () const |
It returns the catalog associated to the sequence. More... | |
unsigned int | getId () const |
It returns the sequence identifier. More... | |
boost::int64_t | getIncrement () const |
It returns the increment value. More... | |
boost::int64_t | getMaxValue () const |
It returns the maximum value that the sequence can generate. More... | |
boost::int64_t | getMinValue () const |
It returns the minimum value that the sequence can generate. More... | |
const std::string & | getName () const |
It returns the sequence name. More... | |
te::dt::Property * | getOwner () const |
It returns the property type associated to the sequence. More... | |
boost::int64_t | getStartValue () const |
It returns the initial value of the sequence. More... | |
bool | isCycled () const |
It returns true if the sequence can wrap, otherwise it returns false. More... | |
Sequence & | operator= (const Sequence &rhs) |
Assignment operator. More... | |
Sequence (DataSourceCatalog *catalog=0, unsigned int id=0) | |
It constructs a new sequence. More... | |
Sequence (const std::string &name, boost::int64_t increment=1, boost::int64_t startValue=1, DataSourceCatalog *catalog=0, unsigned int id=0) | |
It creates a new sequence. More... | |
Sequence (const Sequence &rhs) | |
Copy constructor. More... | |
void | setAsCycle () |
It sets the sequence as cycled (it can wrap). More... | |
void | setAsNoCycle () |
It sets the sequence as not cycled (it can't wrap). More... | |
void | setCachedValues (boost::int64_t value) |
It sets how many sequence numbers are to be preallocated. More... | |
void | setCatalog (DataSourceCatalog *catalog) |
It sets the catalog associated to the sequence. More... | |
void | setId (unsigned int id) |
It sets the sequence identifier. More... | |
void | setIncrement (boost::int64_t n) |
It sets the increment value. More... | |
void | setMaxValue (boost::int64_t value) |
It sets the maximum value that the sequence can generate. More... | |
void | setMinValue (boost::int64_t value) |
It sets the minimum value that the sequence can generate. More... | |
void | setName (const std::string &name) |
It sets the sequence name. More... | |
void | setOwner (te::dt::Property *owner) |
It causes the sequence to be associated with a specific property type. More... | |
void | setStartValue (boost::int64_t value) |
It sets the sequence starting value. More... | |
~Sequence () | |
Destructor. More... | |
Private Attributes | |
boost::int64_t | m_cachedValues |
It specifies how many sequence numbers are to be preallocated for faster access. More... | |
DataSourceCatalog * | m_catalog |
The DataSourceCatalog associated to this sequence. More... | |
bool | m_cycled |
If it is true, the sequence can wrap when it reaches the maximum value in the case of an ascendent sequence or wrap when it reaches the minimum value in the case of a descendant sequence. More... | |
unsigned int | m_id |
An identification number for the sequence. More... | |
boost::int64_t | m_increment |
The value to be added to the current sequence value to create the new value. More... | |
boost::int64_t | m_maxValue |
The maximum value that the sequence can generate. More... | |
boost::int64_t | m_minValue |
The minimum value that the sequence can generate. More... | |
std::string | m_name |
The sequence name. More... | |
te::dt::Property * | m_ownedBy |
The sequence may be associated with a specific property type (owned by a property). More... | |
boost::int64_t | m_startValue |
The sequence starting value. More... | |
It describes a sequence (a number generator).
Definition at line 56 of file Sequence.h.
te::da::Sequence::Sequence | ( | DataSourceCatalog * | catalog = 0 , |
unsigned int | id = 0 |
||
) |
It constructs a new sequence.
A sequence may belongs to the global catalog of a given data source, and it can be associated to a given property of a specific dataset type.
catalog | The catalog associated to the sequence. |
id | The sequence identifier. |
te::da::Sequence::Sequence | ( | const std::string & | name, |
boost::int64_t | increment = 1 , |
||
boost::int64_t | startValue = 1 , |
||
DataSourceCatalog * | catalog = 0 , |
||
unsigned int | id = 0 |
||
) |
It creates a new sequence.
name | The sequence name. |
increment | The value to be added to the current sequence value to create the new value (default = 1). |
startValue | The sequence starting value (default = 1). |
catalog | The catalog associated to the sequence. |
id | The sequence identifier. |
te::da::Sequence::Sequence | ( | const Sequence & | rhs | ) |
Copy constructor.
The new object will not have an associated catalog.
rhs | Right-hand-side instance. |
|
inline |
Destructor.
Definition at line 104 of file Sequence.h.
Sequence* te::da::Sequence::clone | ( | ) |
It returns a clone of the object.
The new object will not have an associated catalog.
|
inline |
It returns how many sequence numbers are preallocated.
Definition at line 210 of file Sequence.h.
|
inline |
It returns the catalog associated to the sequence.
Definition at line 254 of file Sequence.h.
|
inline |
It returns the sequence identifier.
Definition at line 124 of file Sequence.h.
|
inline |
It returns the increment value.
Definition at line 154 of file Sequence.h.
|
inline |
It returns the maximum value that the sequence can generate.
Definition at line 182 of file Sequence.h.
|
inline |
It returns the minimum value that the sequence can generate.
Definition at line 168 of file Sequence.h.
|
inline |
|
inline |
It returns the property type associated to the sequence.
Definition at line 237 of file Sequence.h.
|
inline |
It returns the initial value of the sequence.
Definition at line 196 of file Sequence.h.
|
inline |
It returns true if the sequence can wrap, otherwise it returns false.
Definition at line 224 of file Sequence.h.
Assignment operator.
The new object will not have an associated catalog.
rhs | Right-hand-side instance. |
|
inline |
It sets the sequence as cycled (it can wrap).
Definition at line 227 of file Sequence.h.
|
inline |
It sets the sequence as not cycled (it can't wrap).
Definition at line 230 of file Sequence.h.
|
inline |
It sets how many sequence numbers are to be preallocated.
value | How many sequence numbers are to be preallocated. |
Definition at line 217 of file Sequence.h.
|
inline |
It sets the catalog associated to the sequence.
catalog | The data source catalog to which this sequence belongs. |
Definition at line 264 of file Sequence.h.
|
inline |
It sets the sequence identifier.
id | A number that identifies the sequence. |
Definition at line 133 of file Sequence.h.
|
inline |
It sets the increment value.
n | The increment value. |
Definition at line 161 of file Sequence.h.
|
inline |
It sets the maximum value that the sequence can generate.
value | The maximum value that the sequence can generate. |
Definition at line 189 of file Sequence.h.
|
inline |
It sets the minimum value that the sequence can generate.
value | The minimum value that the sequence can generate. |
Definition at line 175 of file Sequence.h.
|
inline |
It sets the sequence name.
name | The sequence name. |
Definition at line 147 of file Sequence.h.
|
inline |
It causes the sequence to be associated with a specific property type.
When the dataset type is dropped (or its whole catalog), the sequence will be automatically dropped as well.
owner | The property type owner of this sequence. |
Definition at line 247 of file Sequence.h.
|
inline |
It sets the sequence starting value.
value | The sequence starting value. |
Definition at line 203 of file Sequence.h.
|
private |
It specifies how many sequence numbers are to be preallocated for faster access.
Definition at line 281 of file Sequence.h.
|
private |
The DataSourceCatalog associated to this sequence.
Definition at line 282 of file Sequence.h.
|
private |
If it is true, the sequence can wrap when it reaches the maximum value in the case of an ascendent sequence or wrap when it reaches the minimum value in the case of a descendant sequence.
Definition at line 285 of file Sequence.h.
|
private |
An identification number for the sequence.
Definition at line 284 of file Sequence.h.
|
private |
The value to be added to the current sequence value to create the new value.
Definition at line 277 of file Sequence.h.
|
private |
The maximum value that the sequence can generate.
Definition at line 279 of file Sequence.h.
|
private |
The minimum value that the sequence can generate.
Definition at line 278 of file Sequence.h.
|
private |
The sequence name.
Definition at line 286 of file Sequence.h.
|
private |
The sequence may be associated with a specific property type (owned by a property).
Definition at line 283 of file Sequence.h.
|
private |
The sequence starting value.
Definition at line 280 of file Sequence.h.