From eac5556768e4b884d52fef3307c295a0aa50aee6 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Mon, 18 Jan 2010 20:21:11 +0000 Subject: [PATCH] outlined the constructors (and while I was at it, the destructor) of PlaylistElement this fixes #2356 --- .../LiveSupport/Core/PlaylistElement.h | 50 ++--------- .../src/modules/core/src/PlaylistElement.cxx | 84 +++++++++++++++++++ 2 files changed, 89 insertions(+), 45 deletions(-) diff --git a/campcaster/src/modules/core/include/LiveSupport/Core/PlaylistElement.h b/campcaster/src/modules/core/include/LiveSupport/Core/PlaylistElement.h index db17e7f12..aecacfac6 100644 --- a/campcaster/src/modules/core/include/LiveSupport/Core/PlaylistElement.h +++ b/campcaster/src/modules/core/include/LiveSupport/Core/PlaylistElement.h @@ -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::Ref audioClip, Ptr::Ref fadeInfo = Ptr::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::Ref(new time_duration(0,0,0,0))); - setClipEnd(Ptr::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::Ref audioClip, Ptr::Ref fadeInfo = Ptr::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::Ref(new time_duration(0,0,0,0))); - setClipEnd(Ptr::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::Ref playlist, Ptr::Ref fadeInfo = Ptr::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::Ref(new time_duration(0,0,0,0))); - setClipEnd(Ptr::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 diff --git a/campcaster/src/modules/core/src/PlaylistElement.cxx b/campcaster/src/modules/core/src/PlaylistElement.cxx index 03dcc4f3a..188f30254 100644 --- a/campcaster/src/modules/core/src/PlaylistElement.cxx +++ b/campcaster/src/modules/core/src/PlaylistElement.cxx @@ -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::Ref id, + Ptr::Ref relativeOffset, + Ptr::Ref clipLength, + Ptr::Ref audioClip, + Ptr::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::Ref(new time_duration(0,0,0,0))); + setClipEnd(Ptr::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::Ref relativeOffset, + Ptr::Ref clipLength, + Ptr::Ref audioClip, + Ptr::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::Ref(new time_duration(0,0,0,0))); + setClipEnd(Ptr::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::Ref relativeOffset, + Ptr::Ref clipLength, + Ptr::Ref playlist, + Ptr::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::Ref(new time_duration(0,0,0,0))); + setClipEnd(Ptr::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. *----------------------------------------------------------------------------*/