From 091c3a20ef833722ee379656f2a037aabf47e14d Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 6 Jun 2009 23:58:44 +0200 Subject: [PATCH] fix indentation --- src/proc/mobject/session/clip.cpp | 109 ++++++++++++-------------- src/proc/mobject/session/clip.hpp | 125 +++++++++++++++--------------- 2 files changed, 113 insertions(+), 121 deletions(-) diff --git a/src/proc/mobject/session/clip.cpp b/src/proc/mobject/session/clip.cpp index 78655283f..6c8965a7e 100644 --- a/src/proc/mobject/session/clip.cpp +++ b/src/proc/mobject/session/clip.cpp @@ -26,62 +26,55 @@ #include "proc/asset/media.hpp" #include "proc/asset/clip.hpp" -namespace mobject +namespace mobject { +namespace session { + + /** new clip-MO linked with the given asset::Clip. + * Initially, this clip will cover the whole source media length. + */ + Clip::Clip (const asset::Clip& clipDef, const Media& mediaDef) + : start_(0), + mediaDef_(mediaDef), + clipDef_(clipDef) { - namespace session - { - - /** new clip-MO linked with the given asset::Clip. - * Initially, this clip will cover the whole source media length. - */ - Clip::Clip (const asset::Clip& clipDef, const Media& mediaDef) - : start_(0), - mediaDef_(mediaDef), - clipDef_(clipDef) - { - setupLength(); - } - - - - /** implementing the common MObject self test. - * Length definition is consitent, underlying - * media def is accessible etc. */ - bool - Clip::isValid () const - { - TODO ("check consistency of clip length def, implies accessing the underlying media def"); - return length > Time(0); - } - - - void - Clip::setupLength() - { - TODO ("really calculate the length of a clip and set length field"); - this->length = mediaDef_.getLength(); - } - - - PMedia - Clip::getMedia () const - { - return asset::AssetManager::wrap (mediaDef_); - } - - - PClipAsset - Clip::findClipAsset () const - { - return asset::AssetManager::wrap (clipDef_); - } - - - - - - - - } // namespace mobject::session - -} // namespace mobject + setupLength(); + } + + + + /** implementing the common MObject self test. + * Length definition is consitent, underlying + * media def is accessible etc. */ + bool + Clip::isValid () const + { + TODO ("check consistency of clip length def, implies accessing the underlying media def"); + return length > Time(0); + } + + + void + Clip::setupLength() + { + TODO ("really calculate the length of a clip and set length field"); + this->length = mediaDef_.getLength(); + } + + + PMedia + Clip::getMedia () const + { + return asset::AssetManager::wrap (mediaDef_); + } + + + PClipAsset + Clip::findClipAsset () const + { + return asset::AssetManager::wrap (clipDef_); + } + + + + +}} // namespace mobject::session diff --git a/src/proc/mobject/session/clip.hpp b/src/proc/mobject/session/clip.hpp index f0652c2e6..54cc146b0 100644 --- a/src/proc/mobject/session/clip.hpp +++ b/src/proc/mobject/session/clip.hpp @@ -27,73 +27,72 @@ #include "proc/mobject/session/abstractmo.hpp" -namespace asset - { - class Media; - class Clip; - } +namespace asset { + class Media; + class Clip; +} namespace mobject { namespace session { - - using asset::Media; - typedef P PMedia; - typedef P PClipAsset; - - - /** - * A user visible/editable Clip is a reference to a contiguous - * sequence of media data loaded as Asset into the current Session. - * As such, it is a virtual (non destructive) cut or edit of the - * source material and can be placed into the EDL to be rendered - * into the output. The actual media type of a clip will be derived - * at runtime by resolving this reference to the underlying Asset. - * - * @todo define how to denote Time positions /lengths. This is tricky, - * because it depends on the actual media type, and we want to encapsulate - * all these details as much as possible. - */ - class Clip : public AbstractMO - { - protected: - /** start position in source */ - Time start_; - - /** @todo using a mere ref here is against the scheme and only - done as temporal solution, until we work out how to handle - multichannel clips. It should be a smart pointer of some kind - and the unlink() function of the asset should take it into - account when breaking circular references. - */ - - const Media & mediaDef_; - const asset::Clip & clipDef_; - - Clip (const asset::Clip&, const Media&); - friend class MObjectFactory; - - - virtual void setupLength(); - - public: - virtual bool isValid() const; - - /** access the underlying media asset */ - PMedia getMedia () const; - - /** locate the corresponding asset - * representing this clip or the whole - * compound in case of a multichannel clip - */ - PClipAsset findClipAsset () const; - - DEFINE_PROCESSABLE_BY (builder::BuilderTool); - - }; + + using asset::Media; + typedef P PMedia; + typedef P PClipAsset; + + + /** + * A user visible/editable Clip is a reference to a contiguous + * sequence of media data loaded as Asset into the current Session. + * As such, it is a virtual (non destructive) cut or edit of the + * source material and can be placed into the EDL to be rendered + * into the output. The actual media type of a clip will be derived + * at runtime by resolving this reference to the underlying Asset. + * + * @todo define how to denote Time positions /lengths. This is tricky, + * because it depends on the actual media type, and we want to encapsulate + * all these details as much as possible. + */ + class Clip : public AbstractMO + { + protected: + /** start position in source */ + Time start_; - typedef Placement PClipMO; - - + /** @todo using a mere ref here is against the scheme and only + done as temporal solution, until we work out how to handle + multichannel clips. It should be a smart pointer of some kind + and the unlink() function of the asset should take it into + account when breaking circular references. + */ + + const Media & mediaDef_; + const asset::Clip & clipDef_; + + Clip (const asset::Clip&, const Media&); + friend class MObjectFactory; + + + virtual void setupLength(); + + public: + virtual bool isValid() const; + + /** access the underlying media asset */ + PMedia getMedia () const; + + /** locate the corresponding asset + * representing this clip or the whole + * compound in case of a multichannel clip + */ + PClipAsset findClipAsset () const; + + DEFINE_PROCESSABLE_BY (builder::BuilderTool); + + }; + typedef Placement PClipMO; + + + }} // namespace mobject::session #endif