rasdaman client API  10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
Public Member Functions | List of all members
r_Set< T > Class Template Reference

The class implements a set container. More...

#include <set.hh>

Inheritance diagram for r_Set< T >:
r_Collection< T > r_Object

Public Member Functions

 r_Set ()
 default constructor More...
 
 r_Set (const r_Set< T > &set)
 copy constructor More...
 
r_Set< T > & operator= (const r_Set< T > &set)
 
virtual ~r_Set ()=default
 virtual destructor More...
 
virtual void insert_element (const T &element, int no_modification=0)
 inserts an element at the beginning (no duplicates) More...
 
- Public Member Functions inherited from r_Collection< T >
 r_Collection ()
 default constructor More...
 
 r_Collection (const r_Collection< T > &collection)
 copy constructor More...
 
virtual ~r_Collection ()
 virtual destructor More...
 
virtual void r_deactivate ()
 it is called when an object leaves transient memory More...
 
unsigned long cardinality () const
 get number of elements More...
 
bool is_empty () const
 tells if the collection is empty or not More...
 
bool is_ordered () const
 tells if the collection is ordered or not More...
 
bool allows_duplicates () const
 tells if the collections allowes duplicates or not More...
 
bool contains_element (const T &element) const
 asks about the containment of a specific element More...
 
virtual void remove_element (const T &element)
 The method inserts an element into the collection. More...
 
void remove_all ()
 removes all elements More...
 
const r_Collection< T > & operator= (const r_Collection< T > &collection)
 assignment operator More...
 
r_Iterator< T > create_iterator ()
 create an iterator pointing at the first element in the collection More...
 
const r_Typeget_element_type_schema ()
 get base type schema More...
 
virtual void insert_obj_into_db ()
 insert myself into the database More...
 
virtual void insert_obj_into_db (const char *)
 inserts an object into a specific collection in the database More...
 
virtual void update_obj_in_db ()
 The method has no functionality in this class. More...
 
- Public Member Functions inherited from r_Object
 r_Object (r_Transaction *transaction=NULL)
 default constructor More...
 
 r_Object (unsigned short objType, r_Transaction *transaction=NULL)
 constructor getting objType More...
 
 r_Object (const r_Object &, unsigned short objType=0, r_Transaction *transaction=NULL)
 objType specifies the type of the object (1=Marray, 2=Collection). More...
 
virtual ~r_Object ()
 objType specifies the type of the object (1=Marray, 2=Collection). More...
 
void mark_modified ()
 mark the object as modified More...
 
void * operator new (size_t size)
 new operator for transient objects More...
 
void * operator new (size_t size, r_Database *database, const char *type_name=0)
 new operator for persistent objects More...
 
void * operator new (size_t size, const char *type_name)
 new operator for transient objects carrying type information More...
 
void operator delete (void *obj_ptr)
 delete operator More...
 
void set_type_by_name (const char *name)
 set object type by name More...
 
void set_type_structure (const char *name)
 With this method a type name has to be given by the user for each object which he wants to make persistent. More...
 
const char * get_type_name () const
 get object type name More...
 
const char * get_type_structure () const
 get object type structure More...
 
const r_OIdget_oid () const
 get oid More...
 
const r_Typeget_type_schema ()
 get type schema. returns NULL in case of error More...
 
void set_type_schema (const r_Type *type)
 
virtual void load_obj_from_db ()
 load an object from the database More...
 
void delete_obj_from_db ()
 deletes an object from the database More...
 
void initialize_oid (const r_OId &initOId)
 initialize oid of the object More...
 
virtual void r_activate ()
 it is called when an object comes into transient memory More...
 
bool test_status (ObjectStatus status)
 test object status returns 1 if it matches More...
 
ObjectStatus get_status () const
 gets the status of the object More...
 
void set_object_name (const char *name)
 set object name. object name should contain only [a-zA-Z0-9_] More...
 
const char * get_object_name () const
 get object name More...
 
void * operator new (size_t size, r_Database *database, ObjectStatus status, const r_OId &oid)
 new operator for activating an object (status = read) More...
 
r_Transactionget_transaction () const
 

Additional Inherited Members

- Public Types inherited from r_Object
enum  ObjectStatus {
  no_status , deleted , created , modified ,
  read , transient
}
 object life status More...
 
enum  ObjectType { no_object , persistent_object , transient_object }
 created - The object was created in the current transaction and has to be stored in the database. More...
 
- Protected Member Functions inherited from r_Collection< T >
r_Iterator< T > create_removed_iterator ()
 create an iterator for removed objects More...
 
void add_node (CNode *&root, const T &element)
 
bool remove_node (CNode *&root, const T &element)
 
void remove_all_nodes (CNode *&root)
 
void init_node_list (CNode *&root)
 
- Protected Member Functions inherited from r_Object
void update_transaction ()
 resets to the global r_Transaction::actual_transaction if necessary More...
 
bool test_type (ObjectType type)
 test object type returns 1 if it matches More...
 
- Protected Attributes inherited from r_Collection< T >
CNoderemoved_objects
 pointer to list of removed elements More...
 
int isOrdered
 
int allowsDuplicates
 
unsigned long card
 
CNodecoll
 pointer to collection elements More...
 
- Protected Attributes inherited from r_Object
char * object_name {0}
 stores object name if it has one More...
 
char * type_name {0}
 stores object type name if it has one More...
 
char * type_structure {0}
 store type structure as string if it has one More...
 
r_Typetype_schema {0}
 pointer to type schema (built on request) More...
 
unsigned short internal_obj_type {0}
 internal object type (1 marray, 2 collection) More...
 
r_Transactiontransaction {NULL}
 pointer to the transaction this object belongs to. More...
 

Detailed Description

template<class T>
class r_Set< T >

The class implements a set container.

It inherits most of the functionality from r_Collection. The set can not have any duplicates and it is not ordered.

Constructor & Destructor Documentation

◆ r_Set() [1/2]

template<class T >
r_Set< T >::r_Set ( )

default constructor

◆ r_Set() [2/2]

template<class T >
r_Set< T >::r_Set ( const r_Set< T > &  set)

copy constructor

◆ ~r_Set()

template<class T >
virtual r_Set< T >::~r_Set ( )
virtualdefault

virtual destructor

Member Function Documentation

◆ insert_element()

template<class T >
virtual void r_Set< T >::insert_element ( const T &  element,
int  no_modification = 0 
)
virtual

inserts an element at the beginning (no duplicates)

Reimplemented from r_Collection< T >.

◆ operator=()

template<class T >
r_Set<T>& r_Set< T >::operator= ( const r_Set< T > &  set)

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