Loris::Marker Class Reference

#include <Marker.h>

List of all members.

Classes

struct  compareNameLess
struct  compareTimeLess
class  isNameEqual

Public Types

typedef compareNameLess sortByName
typedef compareTimeLess sortByTime

Public Member Functions

 Marker (void)
 Default constructor - initialize a Marker at time zero with no label.
 Marker (double t, const std::string &s)
 Marker (const Marker &other)
Markeroperator= (const Marker &rhs)
bool operator< (const Marker &rhs) const
std::string & name (void)
const std::string & name (void) const
double time (void) const
 Return the time (in seconds) associated with this Marker.
void setName (const std::string &s)
 Set the name of the Marker.
void setTime (double t)
 Set the time (in seconds) associated with this Marker.

Detailed Description

Class Marker represents a labeled time point in a set of Partials or a vector of samples. Collections of Markers (see the MarkerContainer definition below) are held by the File I/O classes in Loris (AiffFile, SdifFile, and SpcFile) to identify temporal features in imported and exported data.


Member Typedef Documentation

old name for compareNameLess, legacy support

Deprecated:
Use compareNameLess instead.

old name for compareTimeLess, legacy support

Deprecated:
Use compareTimeLess instead

Constructor & Destructor Documentation

Loris::Marker::Marker ( double  t,
const std::string &  s 
)

Initialize a Marker with the specified time (in seconds) and name.

Parameters:
t is the time associated with the new Marker
s is the name associated with the new Marker
Loris::Marker::Marker ( const Marker other  ) 

Initialize a Marker that is an exact copy of another Marker, that is, having the same time and name.

Parameters:
other is the Marker to copy from

Member Function Documentation

const std::string& Loris::Marker::name ( void   )  const

Return a const reference to the name string for this Marker.

std::string& Loris::Marker::name ( void   ) 

Return a reference to the name string for this Marker.

bool Loris::Marker::operator< ( const Marker rhs  )  const

Return true if this Marker must appear earlier than rhs in a sorted collection of Markers, and false otherwise. (Markers are sorted by time.)

Parameters:
rhs is the Marker to compare with this Marker
Returns:
true if this Marker's time is earlier than that of rhs, otherwise false
Marker& Loris::Marker::operator= ( const Marker rhs  ) 

Make this Marker an exact copy, having the same time and name, as the Marker rhs.

Parameters:
rhs is the Marker to assign from
Returns:
reference to self

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

Generated by  doxygen 1.6.2