diff --git a/src/gui/model/sequence.cpp b/src/gui/model/sequence.cpp index d5f149a92..2aa4ae479 100644 --- a/src/gui/model/sequence.cpp +++ b/src/gui/model/sequence.cpp @@ -1,5 +1,5 @@ /* - sequence.hpp - Implementation of the Sequence class + Sequence - GUI-model: Sequence Copyright (C) Lumiera.org 2008, Joel Holdsworth @@ -33,7 +33,9 @@ namespace gui { namespace model { -Sequence::Sequence() + +void +Sequence::populateDummySequence() { // TEST CODE static bool first = true; @@ -68,14 +70,11 @@ Sequence::Sequence() INFO(gui, "\n%s", print_branch().c_str()); } + std::string Sequence::print_track() { - std::ostringstream os; - - os << "Sequence\t\"" << get_name() << "\""; - - return os.str(); + return "Sequence\t\"" + get_name() + "\""; } } // namespace model diff --git a/src/gui/model/sequence.hpp b/src/gui/model/sequence.hpp index db856d29e..aae7873ab 100644 --- a/src/gui/model/sequence.hpp +++ b/src/gui/model/sequence.hpp @@ -1,5 +1,5 @@ /* - sequence.hpp - Definition of the Sequence class + SEQUENCE.hpp - GUI-model: Sequence Copyright (C) Lumiera.org 2008, Joel Holdsworth @@ -19,40 +19,58 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + /** @file sequence.hpp - ** This file contains the definition of Sequence, a class which - ** contains a + ** The GUI-Model representation of an editable sequence. + ** @todo Currently (1/2014) this is a dummy placeholder, but later on + ** the GUI-Model entities will be connected to the Session model + ** through the use of PlacementRef */ + + #ifndef SEQUENCE_HPP #define SEQUENCE_HPP #include "gui/model/parent-track.hpp" +#include "lib/hash-indexed.hpp" + +#include namespace gui { namespace model { - + class Track; + /** - * A class representation of a sequence. + * GUI-model representation of a sequence. * @remarks Sequence objects are also the roots of track trees. */ -class Sequence : public ParentTrack -{ -public: - /** - * Constructor - */ - Sequence(); +class Sequence + : public ParentTrack + { + lib::hash::LuidH id_; + + public: + Sequence() + : id_() + { + populateDummySequence(); + }; + + operator lib::HashVal() const + { + return id_; + } + + /** human readable debug string representation of this track. */ + std::string print_track(); - /** - * Produces a human readable debug string representation of this - * track. - * @return Returns the human readable string. - */ - std::string print_track(); -}; + private: + void populateDummySequence(); + }; + } // namespace model } // namespace gui