sparksee.Objects Class Reference

Object identifier set class. More...

List of all members.

Public Member Functions

def any
 Gets an element from the collection.
def difference
 Performs the difference operation.
def is_closed
 Gets if Objects instance has been closed or not.
def combine_union
 Creates a new Objects instance which is the union of the two given.
def iterator_from_element
 Gets an ObjectsIterator starting from the given element.
def exists
 Gets if the given element exists into the collection.
def equals
 Checks if the given Objects contains the same information.
def combine_difference
 Creates a new Objects instance which is the difference of the two given.
def copy
 Performs the copy operation.
def sample
 Creates a new Objects instance which is a sample of the calling one.
def close
 Closes the Objects instance.
def combine_intersection
 Creates a new Objects instance which is the intersection of the two given.
def contains
 Check if this objects contains the other one.
def count
 Gets the number of elements into the collection.
def clear
 Clears the collection removing all its elements.
def __iter__
 Gets a new ObjectsIterator.
def iterator_from_index
 Gets an ObjectsIterator skipping index elements.
def remove
 Removes an element from the collection.
def intersection
 Performs the intersection operation.
def iterator
 Gets an ObjectsIterator.
def union
 Performs the union operation.
def add
 Adds an element into the collection.
def copy
 Creates a new Objects instance as a copy of the given one.

Static Public Attributes

int INVALID_OID = 0
 Invalid OID constant.


Detailed Description

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.

Author:
Sparsity Technologies http://www.sparsity-technologies.com

Member Function Documentation

def sparksee.Objects.any (   self  ) 

Gets an element from the collection.

Returns:
Any element from the collection.
Exceptions:
RuntimeError whether the collection is empty.
RuntimeError null

def sparksee.Objects.difference (   self,
  objs 
)

Performs the difference operation.

This updates the Objects calling instance removing those existing elements at the given Objects instance.

Parameters:
objs [in] Objects instance.
Returns:
Number of elements into the collection once the operation has been executed.

def sparksee.Objects.is_closed (   self  ) 

Gets if Objects instance has been closed or not.

See also:
close()
Returns:
TRUE if the Objects instance has been closed, FALSE otherwise.

def sparksee.Objects.combine_union (   self,
  objs1,
  objs2 
)

Creates a new Objects instance which is the union of the two given.

Two given Objects belong to the same Session.

Parameters:
objs1 [in] Objects instance.
objs2 [in] Objects instance.
Returns:
New Objects instance.

def sparksee.Objects.iterator_from_element (   self,
  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

Parameters:
e [in] The first element to traverse in the resulting ObjectsIterator instance.
Returns:
ObjectsIterator instance.

def sparksee.Objects.exists (   self,
  e 
)

Gets if the given element exists into the collection.

Parameters:
e [in] Element.
Returns:
TRUE if the element exists into the collection, FALSE otherwise.

def sparksee.Objects.equals (   self,
  objs 
)

Checks if the given Objects contains the same information.

Parameters:
objs [in] Objects instance.
Returns:
True if the objects are equal or false otherwise.

def sparksee.Objects.combine_difference (   self,
  objs1,
  objs2 
)

Creates a new Objects instance which is the difference of the two given.

Two given Objects belong to the same Session.

Parameters:
objs1 [in] Objects instance.
objs2 [in] Objects instance.
Returns:
New Objects instance.

def sparksee.Objects.copy (   self,
  objs 
)

Performs the copy operation.

This updates the Objects calling instance and copies the given Objects instance.

Parameters:
objs [in] Objects instance.
Returns:
Number of elements into the collection once the operation has been executed.

def sparksee.Objects.sample (   self,
  exclude,
  samples 
)

Creates a new Objects instance which is a sample of the calling one.

Parameters:
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.
Returns:
Sample collection.

def sparksee.Objects.close (   self  ) 

Closes the Objects instance.

It must be called to ensure the integrity of all data.

def sparksee.Objects.combine_intersection (   self,
  objs1,
  objs2 
)

Creates a new Objects instance which is the intersection of the two given.

Two given Objects belong to the same Session.

Parameters:
objs1 [in] Objects instance.
objs2 [in] Objects instance.
Returns:
New Objects instance.

def sparksee.Objects.contains (   self,
  objs 
)

Check if this objects contains the other one.

Parameters:
objs Objects collection.
Returns:
True if it contains the given object.

def sparksee.Objects.count (   self  ) 

Gets the number of elements into the collection.

Returns:
The number of elements into the collection.

def sparksee.Objects.__iter__ (   self  ) 

Gets a new ObjectsIterator.

Returns:
ObjectsIterator instance

def sparksee.Objects.iterator_from_index (   self,
  index 
)

Gets an ObjectsIterator skipping index elements.

Objects collection has no order, so this method is implementation-dependent.

Parameters:
index [in] The number of elements to skip from the beginning. It must be in the range [0..Size).
Returns:
ObjectsIterator instance.

def sparksee.Objects.remove (   self,
  e 
)

Removes an element from the collection.

Parameters:
e [in] Element to be removed.
Returns:
TRUE if the element is removed, FALSE if the element was not into the collection.

def sparksee.Objects.intersection (   self,
  objs 
)

Performs the intersection operation.

Updates the Objects calling instance setting those existing elements at both two collections and removing all others.

Parameters:
objs [in] Objects instance.
Returns:
Number of elements into the collection once the operation has been executed.

def sparksee.Objects.iterator (   self  ) 

Gets an ObjectsIterator.

Returns:
ObjectsIterator instance.

def sparksee.Objects.union (   self,
  objs 
)

Performs the union operation.

This adds all existing elements of the given Objects instance to the Objects calling instance

Parameters:
objs [in] Objects instance.
Returns:
Number of elements into the collection once the operation has been executed.

def sparksee.Objects.add (   self,
  e 
)

Adds an element into the collection.

Parameters:
e [in] Element to be added.
Returns:
TRUE if the element is added, FALSE if the element was already into the collection.

def sparksee.Objects.copy (   self  ) 

Creates a new Objects instance as a copy of the given one.

Returns:
The new Objects instance.


Generated on Tue Jun 2 16:12:18 2015 for SparkseePython by  doxygen 1.5.6