Processing Data class to encapsulate a CLAM segment. More...
#include <Segment.hxx>
Public Member Functions | |
Segment () | |
Segment (const Segment &prototype, const bool shareData=false, const bool deep=true) | |
__COMMON_DYNAMIC_TYPE (Segment, 8) | |
__COMMON_DYN_ATTRIBUTE (0, public, TTime, BeginTime) protected | |
Begin time in miliseconds. | |
bool | LoadBeginTime (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (1, public, TTime, EndTime) protected | |
End time in miliseconds. | |
bool | LoadEndTime (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (2, private, bool, prHoldsData) protected | |
bool | LoadprHoldsData (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (5, public, List< Segment >, Children) protected | |
bool | LoadChildren (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (6, public, TData, SamplingRate) protected | |
bool | LoadSamplingRate (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (7, public, std::string, Id) protected | |
bool | LoadId (CLAM::Storage &s) |
void | AddFramesArray () |
void | RemoveFramesArray () |
void | SetFramesArray (const List< Frame > &frames) |
const List< Frame > & | GetFramesArray () const |
List< Frame > & | GetFramesArray () |
Segment * | GetpParent () |
Getter for accessing parent segment. | |
void | SetpParent (Segment *newParent) |
Setter for parent segment. | |
void | DefaultInit () |
The concrete dynamic type constructor calls DefaultInit(). | |
void | CopyInit (const Segment &prototype) |
int | GetnFrames () const |
Returns the number of frames in segment. | |
Frame & | GetFrame (TIndex pos) |
Returns a reference to the frame found in a given position. | |
const Frame & | GetFrame (TIndex pos) const |
Returns a constant reference to the frame found in a given position. | |
void | AddFrame (Frame &newFrame) |
Adds a new frame at the end of the segment. | |
void | DeleteFrame (TIndex pos) |
Deletes frame in a given position. | |
TIndex | FindFrame (TTime time) const |
Finds frame with center time closest to the one given. | |
Frame & | GetFrame (TTime time) |
Returns a reference to the frame with center time closest to the one passed. | |
const Frame & | GetFrame (TTime time) const |
Returns a reference to the frame with center time closest to the one passed. | |
void | DeleteFrame (TTime time) |
Deletes frame with center time closest to the one passed. | |
void | SetHoldsData (bool HoldsData) |
Interface for setting the prHoldData member and configuring the Segment accordingly. | |
bool | GetHoldsData () const |
Interface for accessing the prHoldData private member. | |
Public Attributes | |
TIndex | mCurrentFrameIndex |
Index used when processing for keeeping trace of current location in Frame list. |
Processing Data class to encapsulate a CLAM segment.
A Segment is basically an ordered list of Frames (
Definition at line 50 of file Segment.hxx.
CLAM::Segment::Segment | ( | ) | [inline] |
Definition at line 53 of file Segment.hxx.
CLAM::Segment::Segment | ( | const Segment & | prototype, | |
const bool | shareData = false , |
|||
const bool | deep = true | |||
) | [inline] |
Definition at line 53 of file Segment.hxx.
CLAM::Segment::__COMMON_DYN_ATTRIBUTE | ( | 7 | , | |
public | , | |||
std::string | , | |||
Id | ||||
) | [inline] |
Definition at line 63 of file Segment.hxx.
CLAM::Segment::__COMMON_DYN_ATTRIBUTE | ( | 6 | , | |
public | , | |||
TData | , | |||
SamplingRate | ||||
) | [inline] |
Definition at line 62 of file Segment.hxx.
Definition at line 61 of file Segment.hxx.
CLAM::Segment::__COMMON_DYN_ATTRIBUTE | ( | 2 | , | |
private | , | |||
bool | , | |||
prHoldsData | ||||
) | [inline] |
Definition at line 58 of file Segment.hxx.
CLAM::Segment::__COMMON_DYN_ATTRIBUTE | ( | 1 | , | |
public | , | |||
TTime | , | |||
EndTime | ||||
) | [inline] |
End time in miliseconds.
Definition at line 57 of file Segment.hxx.
CLAM::Segment::__COMMON_DYN_ATTRIBUTE | ( | 0 | , | |
public | , | |||
TTime | , | |||
BeginTime | ||||
) | [inline] |
Begin time in miliseconds.
Definition at line 55 of file Segment.hxx.
CLAM::Segment::__COMMON_DYNAMIC_TYPE | ( | Segment | , | |
8 | ||||
) |
void CLAM::Segment::AddFrame | ( | Frame & | newFrame | ) |
Adds a new frame at the end of the segment.
Note that this operation copies the frame.
Definition at line 125 of file Segment.cxx.
Referenced by CLAM::SegmentTransformation::AddFramesToOutputIfInputIsLonger(), CLAM::SegmentTransformation::GetCurrentFrame(), and CLAM::SDIFIn::LoadSDIFDataIntoSegment().
void CLAM::Segment::AddFramesArray | ( | ) | [inline] |
Definition at line 73 of file Segment.hxx.
void CLAM::Segment::CopyInit | ( | const Segment & | prototype | ) |
Definition at line 53 of file Segment.cxx.
void CLAM::Segment::DefaultInit | ( | void | ) |
The concrete dynamic type constructor calls DefaultInit().
This allows user to initialize his/her object. But we define DefaultInit() here because we don't want to force writting one DefaultInit() function for each concrete dynamic type. If a dynamic type concrete class defines some (not-default) constructors, this should also call the DefaultInit().
Reimplemented from CLAM::DynamicType.
Definition at line 31 of file Segment.cxx.
References mCurrentFrameIndex, NULL, and CLAM::DynamicType::UpdateData().
void CLAM::Segment::DeleteFrame | ( | TTime | time | ) |
Deletes frame with center time closest to the one passed.
Time in miliseconds
Definition at line 190 of file Segment.cxx.
References FindFrame(), and GetFrame().
void CLAM::Segment::DeleteFrame | ( | TIndex | pos | ) |
Deletes frame in a given position.
Definition at line 139 of file Segment.cxx.
Referenced by CLAM::SegmentTransformation::IsLastFrame(), and SetHoldsData().
Finds frame with center time closest to the one given.
Time in miliseconds
Definition at line 166 of file Segment.cxx.
Referenced by DeleteFrame(), GetFrame(), and SetHoldsData().
Returns a reference to the frame with center time closest to the one passed.
Time in miliseconds.
Definition at line 185 of file Segment.cxx.
References FindFrame(), and GetFrame().
Returns a reference to the frame with center time closest to the one passed.
Time in miliseconds.
Definition at line 180 of file Segment.cxx.
Returns a constant reference to the frame found in a given position.
Definition at line 101 of file Segment.cxx.
Returns a reference to the frame found in a given position.
Time in miliseconds
Definition at line 113 of file Segment.cxx.
Referenced by CLAM::SegmentTransformation::AddFramesToOutputIfInputIsLonger(), DeleteFrame(), CLAM::SpectralSynthesis::Do(), CLAM::SpectralAnalysis::Do(), CLAM::SegmentTransformation::Do(), CLAM::SegmentTransformation::GetCurrentFrame(), GetFrame(), CLAM::SinusoidalSynthesis::InitFrame(), and CLAM::Segmentator::UnwrapDescriptors().
Definition at line 88 of file Segment.hxx.
Definition at line 87 of file Segment.hxx.
bool CLAM::Segment::GetHoldsData | ( | ) | const [inline] |
Interface for accessing the prHoldData private member.
Definition at line 147 of file Segment.hxx.
int CLAM::Segment::GetnFrames | ( | ) | const |
Returns the number of frames in segment.
Definition at line 86 of file Segment.cxx.
Referenced by CLAM::SegmentTransformation::AddFramesToOutputIfInputIsLonger(), CLAM::SegmentTransformation::Do(), CLAM::Segmentator::Do(), CLAM::SegmentTransformation::GetCurrentFrame(), CLAM::SegmentTransformation::IsLastFrame(), CLAM::SegmentSMSTimeStretch::IsLastFrame(), and CLAM::Segmentator::UnwrapDescriptors().
Segment* CLAM::Segment::GetpParent | ( | ) | [inline] |
Getter for accessing parent segment.
Definition at line 93 of file Segment.hxx.
bool CLAM::Segment::LoadBeginTime | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 55 of file Segment.hxx.
bool CLAM::Segment::LoadChildren | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 61 of file Segment.hxx.
bool CLAM::Segment::LoadEndTime | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 57 of file Segment.hxx.
bool CLAM::Segment::LoadId | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 63 of file Segment.hxx.
bool CLAM::Segment::LoadprHoldsData | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 58 of file Segment.hxx.
bool CLAM::Segment::LoadSamplingRate | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 62 of file Segment.hxx.
void CLAM::Segment::RemoveFramesArray | ( | ) | [inline] |
Definition at line 77 of file Segment.hxx.
Definition at line 82 of file Segment.hxx.
References CLAM::Search< U, T >::Set().
void CLAM::Segment::SetHoldsData | ( | bool | HoldsData | ) |
Interface for setting the prHoldData member and configuring the Segment accordingly.
Definition at line 195 of file Segment.cxx.
References DeleteFrame(), and FindFrame().
void CLAM::Segment::SetpParent | ( | Segment * | newParent | ) | [inline] |
Setter for parent segment.
Definition at line 95 of file Segment.hxx.
Index used when processing for keeeping trace of current location in Frame list.
Definition at line 90 of file Segment.hxx.
Referenced by DefaultInit(), CLAM::SpectralSynthesis::Do(), CLAM::SpectralAnalysis::Do(), CLAM::SegmentTransformation::Do(), CLAM::SinusoidalSynthesis::InitFrame(), and CLAM::SegmentTransformation::IsLastFrame().