Sparksee
6.0.2
|
Object identifier set class. More...
Public Member Functions | |
virtual | ~Objects () |
Destructor. | |
Objects * | Copy () |
Creates a new Objects instance as a copy of the given one. More... | |
int64_t | Count () |
Gets the number of elements into the collection. More... | |
bool_t | Add (oid_t e) |
Adds an element into the collection. More... | |
bool_t | Exists (oid_t e) |
Gets if the given element exists into the collection. More... | |
oid_t | Any () throw (sparksee::gdb::NoSuchElementException, sparksee::gdb::Error) |
Gets an element from the collection. More... | |
bool_t | Remove (oid_t e) |
Removes an element from the collection. More... | |
void | Clear () |
Clears the collection removing all its elements. | |
int64_t | Union (Objects *objs) |
Performs the union operation. More... | |
int64_t | Intersection (Objects *objs) |
Performs the intersection operation. More... | |
int64_t | Difference (Objects *objs) |
Performs the difference operation. More... | |
bool_t | Equals (Objects *objs) |
Checks if the given Objects contains the same information. More... | |
bool_t | Contains (Objects *objs) |
Check if this objects contains the other one. More... | |
int64_t | Copy (Objects *objs) |
Performs the copy operation. More... | |
Objects * | Sample (Objects *exclude, int64_t samples) |
Creates a new Objects instance which is a sample of the calling one. More... | |
ObjectsIterator * | Iterator () |
Gets an ObjectsIterator. More... | |
ObjectsIterator * | IteratorFromIndex (int64_t index) |
Gets an ObjectsIterator skipping index elements. More... | |
ObjectsIterator * | IteratorFromElement (oid_t e) |
Gets an ObjectsIterator starting from the given element. More... | |
Static Public Member Functions | |
static Objects * | CombineUnion (Objects *objs1, Objects *objs2) |
Creates a new Objects instance which is the union of the two given. More... | |
static Objects * | CombineIntersection (Objects *objs1, Objects *objs2) |
Creates a new Objects instance which is the intersection of the two given. More... | |
static Objects * | CombineDifference (Objects *objs1, Objects *objs2) |
Creates a new Objects instance which is the difference of the two given. More... | |
Static Public Attributes | |
static const oid_t | InvalidOID |
Invalid OID constant. | |
Private Member Functions | |
sparksee_core::Objects * | GetHandler () |
Gets the handled reference. More... | |
const sparksee_core::Objects * | GetHandler () const |
Gets the handled reference. More... | |
void | SetHandler (sparksee_core::Objects *h) |
Sets the handled reference. More... | |
void | FreeHandler () |
Frees (deletes) the handled reference. | |
bool_t | IsNull () const |
Gets if the handler is NULL. More... | |
Friends | |
class | Session |
class | Graph |
class | ObjectsIterator |
Object identifier set class.
It stores a collection of Sparksee object identifiers as a set. As a set, there is no order and no duplicated elements.
This class should be used just to store large collections. Otherwise, it is strongly recommended to use common classes from the language API.
This class is not thread-safe.
ObjectsIterator must be used to traverse all the elements into the set.
When the Objects instance is closed, it closes all existing and non-closed ObjectsIterator instances too.
Adds an element into the collection.
e | [in] Element to be added. |
oid_t Objects::Any | ( | ) | ||
throw | ( | sparksee::gdb::NoSuchElementException, | ||
sparksee::gdb::Error | ||||
) |
Gets an element from the collection.
NoSuchElementException | whether the collection is empty. |
Check if this objects contains the other one.
objs | Objects collection. |
Objects* Objects::Copy | ( | ) |
int64_t Objects::Count | ( | ) |
Gets the number of elements into the collection.
Gets if the given element exists into the collection.
e | [in] Element. |
ObjectsIterator* Objects::Iterator | ( | ) |
Gets an ObjectsIterator.
ObjectsIterator* Objects::IteratorFromElement | ( | oid_t | e | ) |
Gets an ObjectsIterator starting from the given element.
Objects collection has no order, so this method is implementation-dependent.
e | [in] The first element to traverse in the resulting ObjectsIterator instance. |
ObjectsIterator* Objects::IteratorFromIndex | ( | int64_t | index | ) |
Gets an ObjectsIterator skipping index elements.
Objects collection has no order, so this method is implementation-dependent.
index | [in] The number of elements to skip from the beginning. It must be in the range [0..Size). |
Removes an element from the collection.
e | [in] Element to be removed. |
Creates a new Objects instance which is a sample of the calling one.
exclude | [in] If not NULL, elements into this collection will be excluded from the resulting one. |
samples | [in] Number of elements into the resulting collection. |