#include <XLine.h>


Public Member Functions | |
| XLine () | |
| XLine (const XLine &) | |
| XLine & | duplicate () const |
| const XLine & | operator= (const XLine &c) |
| bool | operator== (const XLine &c) const |
| bool | operator!= (const XLine &c) const |
| virtual | ~XLine () |
| XLine & | addElement (const String &e) |
| void | deleteElement (const String &e) |
| void | rewind () const |
| String & | getElement (const unsigned long idx, const bool becomeCurrent=true) const |
| String * | getElement () const |
| const XLine & | getElements () const |
| long | getIndex (const String &e) const |
| unsigned long | getElementCount () const |
| void | reset () |
| virtual String | toString () const |
| virtual String | getClassName () const |
Static Public Member Functions | |
| static XLine & | create () |
| static XLine & | create (String &key, String &value) |
Private Attributes | |
| RefVector< String > | _vector |
| unsigned long | _current |
| XLine * | _pLine |
Friends | |
| class | TestXLine |
Definition at line 79 of file XLine.h.
| XLine::XLine | ( | ) |
Create en empty line
Definition at line 65 of file XLine.cpp.
Referenced by create(), and duplicate().
| XLine::XLine | ( | const XLine & | l ) |
Definition at line 86 of file XLine.cpp.
References _vector, alize::RefVector< T >::addObject(), alize::String::duplicate(), alize::RefVector< T >::getObject(), and alize::RefVector< T >::size().
| XLine::~XLine | ( | ) | [virtual] |
Adds a new element at the end of the line. The element become the current element
Definition at line 167 of file XLine.cpp.
References _current, _vector, alize::RefVector< T >::addObject(), and alize::String::duplicate().
Referenced by alize::CmdLine::CmdLine(), create(), alize::XList::getAllElements(), operator=(), alize::XListFileReader::readList(), alize::Matrix< T >::saveDT(), and alize::Config::setParam().
Create a line with key / value - richard.dufour@lium.univ-lemans.fr
Definition at line 77 of file XLine.cpp.
References addElement(), create(), and rewind().
| XLine & XLine::create | ( | ) | [static] |
Create en empty line
Definition at line 68 of file XLine.cpp.
References alize::Object::assertMemoryIsAllocated(), and XLine().
Referenced by create(), and getElements().
| void XLine::deleteElement | ( | const String & | e ) |
Removes and deletes an element
| e | the element to delete |
Definition at line 124 of file XLine.cpp.
References _vector, and alize::RefVector< T >::removeObject().
| XLine & XLine::duplicate | ( | ) | const |
Definition at line 93 of file XLine.cpp.
References alize::Object::assertMemoryIsAllocated(), and XLine().
Referenced by alize::XList::operator=(), and alize::XList::XList().
| String XLine::getClassName | ( | ) | const [virtual] |
Returns the name of the class
Implements alize::Object.
| String & XLine::getElement | ( | const unsigned long | idx, |
| const bool | becomeCurrent = true |
||
| ) | const |
Gets an element
| idx | index of the element |
| becomeCurrent | if is true the element becomes the current element |
| IndexOutOfBoundsException |
Definition at line 129 of file XLine.cpp.
References _current, _vector, and alize::RefVector< T >::getObject().
Referenced by alize::CmdLine::copyIntoConfig(), alize::XList::findLine(), alize::XList::getAllElements(), alize::CmdLine::getContent(), alize::FeatureFileList::getFeatureCount(), alize::FeatureFileList::getFeatureFlags(), alize::FeatureFileList::getFileIndex(), alize::FeatureFileList::getFileName(), alize::CmdLine::getName(), alize::Config::getParam(), alize::Config::getParamContent(), alize::Config::getParamName(), alize::FeatureFileList::getSampleRate(), alize::FeatureFileList::getVectSize(), alize::CmdLine::isShortOption(), alize::Matrix< T >::loadDT(), alize::XList::save(), alize::XList::searchValue(), alize::Config::setParam(), alize::XList::toString(), and alize::Config::toString().
| String * XLine::getElement | ( | ) | const |
Gets the current element. The next element become the current element
Definition at line 148 of file XLine.cpp.
References _current, _vector, alize::RefVector< T >::getObject(), NULL, and alize::RefVector< T >::size().
| unsigned long XLine::getElementCount | ( | ) | const |
Gets the number of elements in the line
Definition at line 179 of file XLine.cpp.
References _vector, and alize::RefVector< T >::size().
Referenced by alize::XList::findLine(), alize::XList::getAllElements(), alize::FeatureFileList::getFeatureCount(), alize::FeatureFileList::getFileIndex(), alize::XList::save(), alize::FeatureFileList::size(), and alize::XList::toString().
| const XLine & XLine::getElements | ( | ) | const |
Gets the elements from the current element to the last one. The current element does not change.
Definition at line 156 of file XLine.cpp.
References _current, _pLine, _vector, alize::RefVector< T >::addObject(), create(), alize::String::duplicate(), alize::RefVector< T >::getObject(), NULL, reset(), and alize::RefVector< T >::size().
| long XLine::getIndex | ( | const String & | e ) | const |
Returns the index of an element
| e | the element to search |
Definition at line 139 of file XLine.cpp.
References _vector, alize::RefVector< T >::getObject(), and alize::RefVector< T >::size().
Definition at line 100 of file XLine.cpp.
References _current, _vector, addElement(), alize::RefVector< T >::getObject(), reset(), and alize::RefVector< T >::size().
| bool XLine::operator== | ( | const XLine & | c ) | const |
Definition at line 112 of file XLine.cpp.
References _vector, alize::RefVector< T >::getObject(), and alize::RefVector< T >::size().
| void XLine::reset | ( | ) |
Removes all elements
Definition at line 173 of file XLine.cpp.
References _current, _vector, and alize::RefVector< T >::deleteAllObjects().
Referenced by alize::XList::getAllElements(), getElements(), and operator=().
| void XLine::rewind | ( | ) | const |
Sets the first element to become the current element
Definition at line 127 of file XLine.cpp.
References _current.
Referenced by create(), alize::XList::getLine(), and alize::XListFileReader::readList().
| String XLine::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
Reimplemented from alize::Object.
Definition at line 183 of file XLine.cpp.
References _vector, alize::RefVector< T >::getObject(), and alize::RefVector< T >::size().
unsigned long alize::XLine::_current [mutable, private] |
Definition at line 159 of file XLine.h.
Referenced by addElement(), getElement(), getElements(), operator=(), reset(), and rewind().
XLine* alize::XLine::_pLine [mutable, private] |
Definition at line 160 of file XLine.h.
Referenced by getElements(), and ~XLine().
RefVector<String> alize::XLine::_vector [private] |
Definition at line 158 of file XLine.h.
Referenced by addElement(), deleteElement(), getElement(), getElementCount(), getElements(), getIndex(), operator=(), operator==(), reset(), toString(), XLine(), and ~XLine().
1.7.2