Public Member Functions | Private Attributes | Friends

alize::LabelSet Class Reference

#include <LabelSet.h>

Inheritance diagram for alize::LabelSet:
Inheritance graph
[legend]
Collaboration diagram for alize::LabelSet:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LabelSet ()
 LabelSet (const FileName &, const Config &)
 LabelSet (const LabelSet &)
const LabelSetoperator= (const LabelSet &)
bool operator== (const LabelSet &)
bool operator!= (const LabelSet &)
virtual ~LabelSet ()
void load (const FileName &f, const Config &c)
void addLabel (real_t b, real_t e, const String &n)
const StringgetName (unsigned long i) const
real_t getBegin (unsigned long index) const
real_t getEnd (unsigned long index) const
unsigned long size () const
void clear ()
virtual String toString () const
virtual String getClassName () const

Private Attributes

RefVector< String_nameVect
DoubleVector _beginVect
DoubleVector _endVect

Friends

class TestLabelSet

Detailed Description

This class represents a set of labels. Each label got a name, a begin value and a end value

Deprecated:
since jan 2005
Author:
Frederic Wils frederic.wils@lia.univ-avignon.fr
Version:
1.0
Date:
2003
Warning:
Not stable. Beta version

Definition at line 85 of file LabelSet.h.


Constructor & Destructor Documentation

LabelSet::LabelSet (  )

Create a LabelSet object

Definition at line 67 of file LabelSet.cpp.

LabelSet::LabelSet ( const FileName f,
const Config c 
) [explicit]

Definition at line 70 of file LabelSet.cpp.

References load().

LabelSet::LabelSet ( const LabelSet s )
LabelSet::~LabelSet (  ) [virtual]

Definition at line 152 of file LabelSet.cpp.

References _nameVect, and alize::RefVector< T >::deleteAllObjects().


Member Function Documentation

void LabelSet::addLabel ( real_t  b,
real_t  e,
const String n 
)

Adds a new line to the list

Parameters:
bthe begin value in seconds
ethe end value in seconds
nthe name of the label

Definition at line 104 of file LabelSet.cpp.

References _beginVect, _endVect, _nameVect, alize::RefVector< T >::addObject(), alize::RealVector< T >::addValue(), and alize::String::duplicate().

void LabelSet::clear (  )
real_t LabelSet::getBegin ( unsigned long  index ) const

Gets the begin value of the line i

Parameters:
ithe index of the line
Returns:
the value
Exceptions:
IndexOutOfBoundsException

Definition at line 123 of file LabelSet.cpp.

References _beginVect.

String LabelSet::getClassName (  ) const [virtual]

Returns the name of the class

Returns:
the name of the class of the object as a String

Implements alize::Object.

Definition at line 129 of file LabelSet.cpp.

real_t LabelSet::getEnd ( unsigned long  index ) const

Gets the end value of the line i

Parameters:
ithe index of the line
Returns:
the value
Exceptions:
IndexOutOfBoundsException

Definition at line 126 of file LabelSet.cpp.

References _endVect.

const String & LabelSet::getName ( unsigned long  i ) const

Gets the label of the line i

Parameters:
ithe index of the line
Returns:
a constant reference to the label
Exceptions:
IndexOutOfBoundsException

Definition at line 117 of file LabelSet.cpp.

References _nameVect, and alize::RefVector< T >::getObject().

Referenced by LabelSet(), operator=(), operator==(), and toString().

void LabelSet::load ( const FileName f,
const Config c 
)

Load a set of labels from a file

Parameters:
fthe file to read
cthe configuration to use
Exceptions:
IOExceptionif an I/O error occurs
FileNotFoundException

Definition at line 111 of file LabelSet.cpp.

References alize::LabelFileReader::readLabels().

Referenced by LabelSet().

bool LabelSet::operator!= ( const LabelSet s )

Definition at line 102 of file LabelSet.cpp.

const LabelSet & LabelSet::operator= ( const LabelSet s )
bool LabelSet::operator== ( const LabelSet s )

Definition at line 89 of file LabelSet.cpp.

References _beginVect, _endVect, _nameVect, getName(), and alize::RefVector< T >::size().

unsigned long LabelSet::size (  ) const

Gets the number of labels in the set

Returns:
the number of labels in the set

Definition at line 131 of file LabelSet.cpp.

References _nameVect, and alize::RefVector< T >::size().

Referenced by toString().

String LabelSet::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

Returns:
a description of the object

Reimplemented from alize::Object.

Definition at line 133 of file LabelSet.cpp.

References _beginVect, _endVect, getName(), size(), and alize::String::valueOf().


Friends And Related Function Documentation

friend class TestLabelSet [friend]

Definition at line 87 of file LabelSet.h.


Member Data Documentation

Definition at line 153 of file LabelSet.h.

Referenced by addLabel(), clear(), getBegin(), operator=(), operator==(), and toString().

Definition at line 154 of file LabelSet.h.

Referenced by addLabel(), clear(), getEnd(), operator=(), operator==(), and toString().

Definition at line 152 of file LabelSet.h.

Referenced by addLabel(), clear(), getName(), LabelSet(), operator=(), operator==(), size(), and ~LabelSet().


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