Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ParentTrack Class Reference

#include "gui/model/parent-track.hpp"

Description

ParentTrack is the abstract base class of all tracks that can parent children.

Definition at line 44 of file parent-track.hpp.

Public Member Functions

bool can_host_children () const
 Returns true if this track can own any child tracks. More...
 
shared_ptr< ParentTrackfind_descendant_track_parent (shared_ptr< Track > child)
 A utility function that attempts to find the parent of a track by searching through the tree from this track downward. More...
 
lumiera::observable_list
< shared_ptr< Track > > & 
get_child_track_list ()
 Gets read-write access to the list of child tracks. More...
 
const list< shared_ptr< Track > > & get_child_tracks () const
 Gets a read-only reference to the the list of child tracks. More...
 
bool remove_descendant_track (const shared_ptr< Track > track)
 Tries to remove a given track from amongst the descendants of this track. More...
 
- Public Member Functions inherited from Track
virtual ~Track ()
 
const std::string get_name () const
 Gets the name of this track. More...
 
bool getEnabled () const
 Gets the enabled status of this track, i.e. More...
 
bool getLocked () const
 Gets the locked status of this track, i.e. More...
 
std::string print_branch ()
 A debugging helper function that prints this track, and all it's child tracks in a human-readable form. More...
 
virtual std::string print_track ()=0
 A pure-virtual function which is the base of functions that print this track in human readable form. More...
 
void set_name (const std::string &name)
 Sets the name of this track. More...
 
void setEnabled (bool enabled)
 Sets the enabled status of this track, i.e. More...
 
void setLocked (bool locked)
 Gets the locked status of this track, i.e. More...
 
sigc::signal< void, bool > signalEnabledChanged () const
 A signal which fires when the enabled status changes. More...
 
sigc::signal< void, bool > signalLockedChanged () const
 A signal which fires when the locked status changes changes. More...
 
sigc::signal< void, std::string > signalNameChanged () const
 A signal which fires when the name changes. More...
 

Protected Member Functions

 ParentTrack ()
 Constructor. More...
 
- Protected Member Functions inherited from Track
 Track ()
 Constructor. More...
 
std::string print_branch_recursive (const unsigned int indentation)
 The internal implementation of print_branch. More...
 

Protected Attributes

lumiera::observable_list
< shared_ptr< Track > > 
tracks
 The internal list of child tracks of this parent. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from Track
static const std::list
< shared_ptr< Track > > 
NoChildren
 An object used internally as a return value for when there's no children. More...
 

Constructor & Destructor Documentation

ParentTrack ( )
protected

Constructor.

Definition at line 39 of file parent-track.cpp.

Member Function Documentation

const std::list< shared_ptr< Track > > & get_child_tracks ( ) const
virtual

Gets a read-only reference to the the list of child tracks.

Reimplemented from Track.

Definition at line 44 of file parent-track.cpp.

References ParentTrack::tracks.

lumiera::observable_list< shared_ptr< Track > > & get_child_track_list ( )

Gets read-write access to the list of child tracks.

Definition at line 50 of file parent-track.cpp.

References ParentTrack::tracks.

bool can_host_children ( ) const
virtual

Returns true if this track can own any child tracks.

Returns
Returns true because all classed derrived from ParentTrack can.

Reimplemented from Track.

Definition at line 56 of file parent-track.cpp.

bool remove_descendant_track ( const shared_ptr< Track track)

Tries to remove a given track from amongst the descendants of this track.

Parameters
Themodel track to try and remove.
Returns
Returns true if the track was successfully removed.

Definition at line 62 of file parent-track.cpp.

References ParentTrack::find_descendant_track_parent().

+ Here is the call graph for this function:

shared_ptr< ParentTrack > find_descendant_track_parent ( shared_ptr< Track child)
virtual

A utility function that attempts to find the parent of a track by searching through the tree from this track downward.

Parameters
childThe child track to find the parent of.
Returns
Returns the parent track if one was found, or an empty shared_ptr if none was found.

Reimplemented from Track.

Definition at line 79 of file parent-track.cpp.

References NULL, and ParentTrack::tracks.

Referenced by ParentTrack::remove_descendant_track().

+ Here is the caller graph for this function:

Member Data Documentation

+ Inheritance diagram for ParentTrack:
+ Collaboration diagram for ParentTrack:

The documentation for this class was generated from the following files: