outlined the constructors (and while I was at it, the destructor) of PlaylistElement

this fixes #2356
This commit is contained in:
fgerlits 2010-01-18 20:21:11 +00:00
parent 119fe16995
commit eac5556768
2 changed files with 89 additions and 45 deletions

View File

@ -179,9 +179,7 @@ class PlaylistElement : public Configurable
/**
* The default constructor.
*/
PlaylistElement(void) throw ()
{
}
PlaylistElement(void) throw ();
/**
* Create a playlist element by specifying all details.
@ -200,19 +198,7 @@ class PlaylistElement : public Configurable
Ptr<AudioClip>::Ref audioClip,
Ptr<FadeInfo>::Ref fadeInfo
= Ptr<FadeInfo>::Ref())
throw ()
{
this->id = id;
this->relativeOffset = relativeOffset;
this->clipLength = clipLength;
this->audioClip = audioClip;
this->playable = audioClip;
this->fadeInfo = fadeInfo;
this->type = AudioClipType;
setClipStart(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
setClipEnd(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
}
throw ();
/**
* Create a new audio clip playlist element, with a new UniqueId,
@ -229,19 +215,7 @@ class PlaylistElement : public Configurable
Ptr<AudioClip>::Ref audioClip,
Ptr<FadeInfo>::Ref fadeInfo
= Ptr<FadeInfo>::Ref())
throw ()
{
this->id = UniqueId::generateId();
this->relativeOffset = relativeOffset;
this->clipLength = clipLength;
this->audioClip = audioClip;
this->playable = audioClip;
this->fadeInfo = fadeInfo;
this->type = AudioClipType;
setClipStart(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
setClipEnd(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
}
throw ();
/**
* Create a new sub-playlist playlist element, with a new UniqueId,
@ -258,27 +232,13 @@ class PlaylistElement : public Configurable
Ptr<Playlist>::Ref playlist,
Ptr<FadeInfo>::Ref fadeInfo
= Ptr<FadeInfo>::Ref())
throw ()
{
this->id = UniqueId::generateId();
this->relativeOffset = relativeOffset;
this->clipLength = clipLength;
this->playlist = playlist;
this->playable = playlist;
this->fadeInfo = fadeInfo;
this->type = PlaylistType;
setClipStart(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
setClipEnd(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
}
throw ();
/**
* A virtual destructor, as this class has virtual functions.
*/
virtual
~PlaylistElement(void) throw ()
{
}
~PlaylistElement(void) throw ();
/**
* Return the name of the XML element this object expects

View File

@ -96,6 +96,90 @@ static const std::string fadeInfoElementName = "fadeInfo";
/* ============================================================= module code */
/*------------------------------------------------------------------------------
* The default constructor.
*----------------------------------------------------------------------------*/
PlaylistElement :: PlaylistElement(void) throw ()
{
}
/*------------------------------------------------------------------------------
* Create a playlist element by specifying all details.
*----------------------------------------------------------------------------*/
PlaylistElement :: PlaylistElement(Ptr<UniqueId>::Ref id,
Ptr<time_duration>::Ref relativeOffset,
Ptr<time_duration>::Ref clipLength,
Ptr<AudioClip>::Ref audioClip,
Ptr<FadeInfo>::Ref fadeInfo)
throw ()
{
this->id = id;
this->relativeOffset = relativeOffset;
this->clipLength = clipLength;
this->audioClip = audioClip;
this->playable = audioClip;
this->fadeInfo = fadeInfo;
this->type = AudioClipType;
setClipStart(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
setClipEnd(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
}
/*------------------------------------------------------------------------------
* Create a new audio clip playlist element, with a new UniqueId,
* to be added to a playlist.
*----------------------------------------------------------------------------*/
PlaylistElement :: PlaylistElement(Ptr<time_duration>::Ref relativeOffset,
Ptr<time_duration>::Ref clipLength,
Ptr<AudioClip>::Ref audioClip,
Ptr<FadeInfo>::Ref fadeInfo)
throw ()
{
this->id = UniqueId::generateId();
this->relativeOffset = relativeOffset;
this->clipLength = clipLength;
this->audioClip = audioClip;
this->playable = audioClip;
this->fadeInfo = fadeInfo;
this->type = AudioClipType;
setClipStart(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
setClipEnd(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
}
/*------------------------------------------------------------------------------
* Create a new sub-playlist playlist element, with a new UniqueId,
* to be added to a playlist.
*----------------------------------------------------------------------------*/
PlaylistElement :: PlaylistElement(Ptr<time_duration>::Ref relativeOffset,
Ptr<time_duration>::Ref clipLength,
Ptr<Playlist>::Ref playlist,
Ptr<FadeInfo>::Ref fadeInfo)
throw ()
{
this->id = UniqueId::generateId();
this->relativeOffset = relativeOffset;
this->clipLength = clipLength;
this->playlist = playlist;
this->playable = playlist;
this->fadeInfo = fadeInfo;
this->type = PlaylistType;
setClipStart(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
setClipEnd(Ptr<time_duration>::Ref(new time_duration(0,0,0,0)));
}
/*------------------------------------------------------------------------------
* A virtual destructor, as this class has virtual functions.
*----------------------------------------------------------------------------*/
PlaylistElement :: ~PlaylistElement(void) throw ()
{
}
/*------------------------------------------------------------------------------
* Create a playlist element object based on an XML element.
*----------------------------------------------------------------------------*/