#include <SegCluster.h>


Public Member Functions | |
| virtual | ~SegCluster () |
| virtual unsigned long | begin () const |
| virtual unsigned long | length () const |
| void | add (SegAbstract &s) |
| void | add (SegAbstract &s, unsigned long pos) |
| Seg & | addCopy (const Seg &s) |
| Seg & | addCopy (const Seg &s, unsigned long pos) |
| Seg & | addNewSeg (unsigned long b=0, unsigned long l=0, unsigned long lc=0, const String &s="", const String &sn="") |
| void | remove (SegAbstract &s) |
| SegAbstract & | remove (unsigned long idx) |
| void | removeAll () |
| SegAbstract & | get (unsigned long i) const |
| bool | getFeatureLabelCode (unsigned long n, unsigned long &lc, bool &isFirst, bool &isLast) const |
| bool | getFeatureLabelCode (unsigned long n, unsigned long &lc) const |
| unsigned long | getCount () const |
| virtual Seg * | getSeg () const |
| unsigned long | getId () const |
| virtual void | rewind () const |
| virtual String | getClassName () const |
| virtual String | toString () const |
| SegCluster & | duplicate (const K &, SegServer &) const |
| void | setId (const K &, unsigned long id) |
| virtual void | getExtremeBoundaries (const K &, unsigned long &b, unsigned long &e, bool &isDefined) const |
Static Public Member Functions | |
| static SegCluster & | create (const K &, SegServer &ss, unsigned long lc=0, const String &s="", const String &sn="") |
Private Member Functions | |
| SegCluster (SegServer &ss, unsigned long lc=0, const String &s="", const String &sn="") | |
| SegCluster (const SegCluster &) | |
| const SegCluster & | operator= (const SegCluster &c) |
| bool | operator== (const SegCluster &c) const |
| bool | operator!= (const SegCluster &c) const |
Private Attributes | |
| RefVector< SegAbstract > | _vect |
| unsigned long | _id |
| SegAbstract * | _pCurrentSubSeg |
| Seg * | _pCurrentSeg |
| Seg * | _pStartSeg |
| unsigned long | _b |
| unsigned long | _e |
| unsigned long | _lc |
Friends | |
| class | TestSegCluster |
| class | TestSegServer |
Class for a hierarchical cluster of segments.
Definition at line 81 of file SegCluster.h.
| C::~SegCluster | ( | ) | [virtual] |
Definition at line 285 of file SegCluster.cpp.
| C::SegCluster | ( | SegServer & | ss, |
| unsigned long | lc = 0, |
||
| const String & | s = "", |
||
| const String & | sn = "" |
||
| ) | [explicit, private] |
Definition at line 69 of file SegCluster.cpp.
References rewind().
| alize::SegCluster::SegCluster | ( | const SegCluster & | ) | [private] |
| void C::add | ( | SegAbstract & | s ) |
Adds a segment or sub-cluster to a cluster
| s | the segment or sub-cluster to add |
Definition at line 142 of file SegCluster.cpp.
References alize::SegAbstract::addOwner(), alize::SegAbstract::getServer(), and alize::K::k.
Referenced by alize::SegServer::assign().
| void C::add | ( | SegAbstract & | s, |
| unsigned long | pos | ||
| ) |
Adds a segment or sub-cluster to this cluster at a particular position
| s | the segment or sub-cluster to add |
| pos | the position of the added object |
Definition at line 150 of file SegCluster.cpp.
References alize::SegAbstract::addOwner(), alize::SegAbstract::getServer(), and alize::K::k.
Creates a new segment copying an existing segment and adds it to this cluster
| s | the segment to copy |
Definition at line 158 of file SegCluster.cpp.
References alize::SegAbstract::addOwner(), and alize::K::k.
Creates a new segment copying an existing segment and adds it to this cluster
| s | the segment to copy |
| pos | the position of the new segment |
Definition at line 166 of file SegCluster.cpp.
References alize::SegAbstract::addOwner(), and alize::K::k.
| Seg & C::addNewSeg | ( | unsigned long | b = 0, |
| unsigned long | l = 0, |
||
| unsigned long | lc = 0, |
||
| const String & | s = "", |
||
| const String & | sn = "" |
||
| ) |
Creates a new segment and adds it to this cluster
| b | = begin : number of the first feature |
| l | = length : count of features |
| lc | = label code |
| s | = a free string |
| sn | = source name (free). Ex: file name |
Definition at line 174 of file SegCluster.cpp.
References alize::SegAbstract::addOwner(), and alize::K::k.
| unsigned long C::begin | ( | ) | const [virtual] |
Recherche dans le cluster le segment dont le numéro de 1ere trame (begin) est le plus petit parmis tous les segments du cluster et retourne ce numéro. Cette fonction nécessite de parcourir tous les segments donc est couteuse en temps.
Implements alize::SegAbstract.
Definition at line 122 of file SegCluster.cpp.
References alize::K::k.
| SegCluster & C::create | ( | const K & | , |
| SegServer & | ss, | ||
| unsigned long | lc = 0, |
||
| const String & | s = "", |
||
| const String & | sn = "" |
||
| ) | [static] |
Definition at line 73 of file SegCluster.cpp.
| SegCluster & C::duplicate | ( | const K & | , |
| SegServer & | ss | ||
| ) | const |
Definition at line 85 of file SegCluster.cpp.
References alize::K::k, and alize::SegAbstract::list().
Referenced by alize::SegServer::assign().
| SegAbstract & C::get | ( | unsigned long | i ) | const |
Returns the segment or sub-clusters at the position i
| i | the position of the object to get |
Definition at line 206 of file SegCluster.cpp.
Referenced by alize::SegServer::assign().
| String C::getClassName | ( | ) | const [virtual] |
Returns the name of the class
Implements alize::SegAbstract.
Definition at line 267 of file SegCluster.cpp.
| unsigned long C::getCount | ( | ) | const |
Returns the number of segments or clusters contained in this cluster.
Definition at line 204 of file SegCluster.cpp.
Referenced by alize::SegServer::assign().
| void C::getExtremeBoundaries | ( | const K & | , |
| unsigned long & | b, | ||
| unsigned long & | e, | ||
| bool & | isDefined | ||
| ) | const [virtual] |
Implements alize::SegAbstract.
Definition at line 260 of file SegCluster.cpp.
References alize::K::k.
| bool C::getFeatureLabelCode | ( | unsigned long | n, |
| unsigned long & | lc, | ||
| bool & | isFirst, | ||
| bool & | isLast | ||
| ) | const |
Recherche dans le cluster le 1er segment qui contient une feature (identifiée par son n°) et renvoi true s'il existe. La méthode parcours tous les segments du cluster et regarde si begin >= n°feature < begin + length
Après appel de la méthode, la variable lc contient le code label du segment trouvé.
De plus, les booléens first et last permettent de savoir si la feature est la dernière du segment ou la première METHODE PROVISOIRE. Sera remplacé par une méthode qui accepte directement pour paramètre une feature (Feature&) et non plus le n° de la feature
| n | feature number |
| lc | a variable to store the label code |
| isFirst | a boolean to indicate that the feature is or is not the first inside the segment |
| isLast | a boolean to indicate that the feature is or is not the last inside the segment |
Definition at line 219 of file SegCluster.cpp.
References NULL.
| bool C::getFeatureLabelCode | ( | unsigned long | n, |
| unsigned long & | lc | ||
| ) | const |
Like other same-name method but without needing parameters isFirst and isLast METHODE PROVISOIRE. Sera remplacé par une méthode qui accepte directement pour paramètre une feature (Feature&) et non plus le n° de la feature
| n | feature number |
| lc | a variable to store the label code |
Definition at line 208 of file SegCluster.cpp.
References NULL.
| unsigned long C::getId | ( | ) | const |
Returns the id (unique) of the cluster
Definition at line 92 of file SegCluster.cpp.
Referenced by alize::SegServer::assign(), alize::SegServer::remove(), and alize::SegServer::setClusterId().
| Seg * C::getSeg | ( | ) | const [virtual] |
Gets the next segment (sequential read). Reads all the segment of a cluster and sub-clusters.
See method getSeg()
Implements alize::SegAbstract.
Definition at line 102 of file SegCluster.cpp.
References alize::Seg::getSeg(), and NULL.
| unsigned long C::length | ( | ) | const [virtual] |
Retourne le nombre de features du cluster par différence entre la 1ere feature (méthode begin()) et la dernière (même principe que la méthode begin()).
Implements alize::SegAbstract.
Definition at line 132 of file SegCluster.cpp.
References alize::K::k.
| bool alize::SegCluster::operator!= | ( | const SegCluster & | c ) | const [private] |
| const SegCluster& alize::SegCluster::operator= | ( | const SegCluster & | c ) | [private] |
| bool alize::SegCluster::operator== | ( | const SegCluster & | c ) | const [private] |
| void C::remove | ( | SegAbstract & | s ) |
Removes a segment or sub-cluster from this cluster
| s | the segment or sub-cluster to add |
Definition at line 183 of file SegCluster.cpp.
References alize::K::k, and alize::SegAbstract::removeOwner().
| SegAbstract & C::remove | ( | unsigned long | idx ) |
Removes a segment or sub-cluster from this cluster by it's index
| idx | the index |
Definition at line 189 of file SegCluster.cpp.
References alize::K::k, and alize::SegAbstract::removeOwner().
| void C::removeAll | ( | ) |
Removes all components of this cluster
Definition at line 197 of file SegCluster.cpp.
References alize::K::k.
Referenced by alize::SegServer::remove().
| void C::rewind | ( | ) | const [virtual] |
Sets the first segment to become the current segment (sequential read)
Reimplemented from alize::SegAbstract.
Definition at line 96 of file SegCluster.cpp.
References NULL.
Referenced by SegCluster().
| void C::setId | ( | const K & | , |
| unsigned long | id | ||
| ) |
Definition at line 94 of file SegCluster.cpp.
Referenced by alize::SegServer::assign(), alize::SegServer::createCluster(), and alize::SegServer::setClusterId().
| String C::toString | ( | ) | const [virtual] |
This method is frequently overridden in the derived classes. If it is not, it returns the name of the class of the object and the address of the object
Implements alize::SegAbstract.
Definition at line 269 of file SegCluster.cpp.
References alize::Object::toString(), and alize::String::valueOf().
friend class TestSegCluster [friend] |
Reimplemented from alize::SegAbstract.
Definition at line 83 of file SegCluster.h.
friend class TestSegServer [friend] |
Reimplemented from alize::SegAbstract.
Definition at line 84 of file SegCluster.h.
unsigned long alize::SegCluster::_b [mutable, private] |
Definition at line 250 of file SegCluster.h.
unsigned long alize::SegCluster::_e [mutable, private] |
Definition at line 251 of file SegCluster.h.
unsigned long alize::SegCluster::_id [private] |
Definition at line 242 of file SegCluster.h.
unsigned long alize::SegCluster::_lc [mutable, private] |
Definition at line 252 of file SegCluster.h.
Seg* alize::SegCluster::_pCurrentSeg [mutable, private] |
Definition at line 248 of file SegCluster.h.
SegAbstract* alize::SegCluster::_pCurrentSubSeg [mutable, private] |
Definition at line 245 of file SegCluster.h.
Seg* alize::SegCluster::_pStartSeg [mutable, private] |
Definition at line 249 of file SegCluster.h.
RefVector<SegAbstract> alize::SegCluster::_vect [private] |
Definition at line 241 of file SegCluster.h.
1.7.2