#include <Seg.h>


Public Member Functions | |
| virtual | ~Seg () |
| void | setBegin (unsigned long b) |
| void | setLength (unsigned long l) |
| virtual unsigned long | begin () const |
| virtual unsigned long | length () const |
| Seg & | merge (Seg &s) |
| Seg & | split (unsigned long i) |
| Seg & | duplicate () const |
| virtual String | getClassName () const |
| virtual String | toString () const |
| virtual Seg * | getSeg () const |
| Seg & | duplicate (const K &, SegServer &ss) const |
| virtual void | getExtremeBoundaries (const K &, unsigned long &b, unsigned long &e, bool &isDefined) const |
Static Public Member Functions | |
| static Seg & | create (const K &, SegServer &ss, unsigned long b=0, unsigned long e=0, unsigned long lc=0, const String &s="", const String &sn="") |
Private Member Functions | |
| Seg (SegServer &ss, unsigned long b=0, unsigned long e=0, unsigned long lc=0, const String &s="", const String &sn="") | |
| Seg (const Seg &) | |
| const Seg & | operator= (const Seg &c) |
| bool | operator== (const Seg &c) const |
| bool | operator!= (const Seg &c) const |
Private Attributes | |
| unsigned long | _begin |
| unsigned long | _length |
Friends | |
| class | TestSeg |
| class | TestSegCluster |
| class | TestSegServer |
Class for a segment.
Definition at line 81 of file Seg.h.
| alize::Seg::Seg | ( | const Seg & | ) | [private] |
| unsigned long Seg::begin | ( | ) | const [virtual] |
Returns the number of the beginning feature of the segment
Implements alize::SegAbstract.
Definition at line 118 of file Seg.cpp.
References _begin.
Referenced by merge().
| Seg & Seg::create | ( | const K & | , |
| SegServer & | ss, | ||
| unsigned long | b = 0, |
||
| unsigned long | e = 0, |
||
| unsigned long | lc = 0, |
||
| const String & | s = "", |
||
| const String & | sn = "" |
||
| ) | [static] |
Definition at line 69 of file Seg.cpp.
References alize::Object::assertMemoryIsAllocated(), and Seg().
Referenced by duplicate().
Definition at line 77 of file Seg.cpp.
References _begin, alize::SegAbstract::_labelCode, _length, alize::SegAbstract::_list, alize::SegAbstract::_srcName, alize::SegAbstract::_string, create(), alize::K::k, and alize::SegAbstract::list().
| Seg & Seg::duplicate | ( | ) | const |
Duplicate a segment. The new segment is stored inside the segment server.
Definition at line 142 of file Seg.cpp.
References alize::SegServer::duplicateSeg(), and alize::SegAbstract::getServer().
Referenced by alize::SegServer::assign(), alize::SegServer::duplicateSeg(), and split().
| String Seg::getClassName | ( | ) | const [virtual] |
Returns the name of the class
Implements alize::SegAbstract.
| void Seg::getExtremeBoundaries | ( | const K & | , |
| unsigned long & | b, | ||
| unsigned long & | e, | ||
| bool & | isDefined | ||
| ) | const [virtual] |
Implements alize::SegAbstract.
| Seg * Seg::getSeg | ( | ) | const [virtual] |
Do not use. Internal usage.
Implements alize::SegAbstract.
Definition at line 88 of file Seg.cpp.
References alize::SegAbstract::_current, and NULL.
Referenced by alize::SegCluster::getSeg().
| unsigned long Seg::length | ( | ) | const [virtual] |
Returns the number of features (length) of the segment
Implements alize::SegAbstract.
Definition at line 116 of file Seg.cpp.
References _length.
Merges two segments. The second segment is destroyed after merging.
If the data "string" are not the same, the second string is added to the first string.
If the data "srcName" are not the same, the source names are* concatenated.
The internal lists are concatenated
The label code of the second segment is ignored.
| s | the segment to merge with this segment |
Definition at line 120 of file Seg.cpp.
References _begin, _length, alize::SegAbstract::_list, alize::SegAbstract::_srcName, alize::SegAbstract::_string, alize::XList::addLine(), begin(), alize::XList::getLine(), alize::XList::getLineCount(), alize::SegAbstract::getServer(), alize::SegAbstract::list(), and alize::SegServer::remove().
| bool alize::Seg::operator!= | ( | const Seg & | c ) | const [private] |
not implemented
| bool alize::Seg::operator== | ( | const Seg & | c ) | const [private] |
not implemented
| void Seg::setBegin | ( | unsigned long | b ) |
| void Seg::setLength | ( | unsigned long | l ) |
| Seg & Seg::split | ( | unsigned long | i ) |
Splits this segment starting to a given feature and create a second segment in the server. If the original segment belongs to clusters, the second segment is added behind the original segment in the clusters. All the data (except begin and length) of the segment are duplicated in the second segment.
| i | number of the feature used as the first feature of the second generated segment |
Definition at line 144 of file Seg.cpp.
References _begin, _length, duplicate(), setBegin(), setLength(), and alize::String::valueOf().
| String Seg::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 160 of file Seg.cpp.
References _begin, alize::SegAbstract::_labelCode, _length, alize::SegAbstract::_srcName, alize::SegAbstract::_string, and alize::String::valueOf().
friend class TestSeg [friend] |
Reimplemented from alize::SegAbstract.
friend class TestSegCluster [friend] |
Reimplemented from alize::SegAbstract.
friend class TestSegServer [friend] |
Reimplemented from alize::SegAbstract.
unsigned long alize::Seg::_begin [private] |
Definition at line 158 of file Seg.h.
Referenced by begin(), duplicate(), getExtremeBoundaries(), merge(), setBegin(), split(), and toString().
unsigned long alize::Seg::_length [private] |
Definition at line 159 of file Seg.h.
Referenced by duplicate(), getExtremeBoundaries(), length(), merge(), setLength(), split(), and toString().
1.7.2