ardour
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
ARDOUR::Locations Class Reference

#include <location.h>

Inheritance diagram for ARDOUR::Locations:
ARDOUR::SessionHandleRef PBD::StatefulDestructible PBD::ScopedConnectionList PBD::Stateful PBD::Destructible

Public Types

typedef std::list< Location * > LocationList
 

Public Member Functions

 Locations (Session &)
 
 ~Locations ()
 
const LocationListlist ()
 
void add (Location *, bool make_current=false)
 
void remove (Location *)
 
void clear ()
 
void clear_markers ()
 
void clear_ranges ()
 
XMLNodeget_state (void)
 
int set_state (const XMLNode &, int version)
 
Locationget_location_by_id (PBD::ID)
 
Locationauto_loop_location () const
 
Locationauto_punch_location () const
 
Locationsession_range_location () const
 
int next_available_name (std::string &result, std::string base)
 
uint32_t num_range_markers () const
 
int set_current (Location *, bool want_lock=true)
 
Locationcurrent () const
 
Locationmark_at (framepos_t, framecnt_t slop=0) const
 
framepos_t first_mark_before (framepos_t, bool include_special_ranges=false)
 
framepos_t first_mark_after (framepos_t, bool include_special_ranges=false)
 
void marks_either_side (framepos_t const, framepos_t &, framepos_t &) const
 
void find_all_between (framepos_t start, framepos_t, LocationList &, Location::Flags)
 
template<class T >
void apply (T &obj, void(T::*method)(const LocationList &)) const
 
- Public Member Functions inherited from ARDOUR::SessionHandleRef
 SessionHandleRef (ARDOUR::Session &s)
 
virtual ~SessionHandleRef ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 
- Public Member Functions inherited from PBD::Stateful
 Stateful ()
 
virtual ~Stateful ()
 
virtual bool apply_changes (PropertyBase const &)
 
PropertyChange apply_changes (PropertyList const &)
 
const OwnedPropertyListproperties () const
 
void add_property (PropertyBase &s)
 
void add_extra_xml (XMLNode &)
 
XMLNodeextra_xml (const std::string &str, bool add_if_missing=false)
 
void save_extra_xml (const XMLNode &)
 
const PBD::IDid () const
 
bool set_id (const XMLNode &)
 
void set_id (const std::string &)
 
void reset_id ()
 
void clear_changes ()
 
virtual void clear_owned_changes ()
 
PropertyListget_changes_as_properties (Command *) const
 
virtual void rdiff (std::vector< Command * > &) const
 
bool changed () const
 
virtual PropertyListproperty_factory (const XMLNode &) const
 
virtual void suspend_property_changes ()
 
virtual void resume_property_changes ()
 
bool property_changes_suspended () const
 
- Public Member Functions inherited from PBD::Destructible
 Destructible ()
 
virtual ~Destructible ()
 
void drop_references ()
 

Public Attributes

PBD::Signal1< void, Location * > current_changed
 
PBD::Signal1< void, Location * > added
 
PBD::Signal1< void, Location * > removed
 
PBD::Signal0< void > changed
 
- Public Attributes inherited from PBD::Stateful
PBD::Signal1< void, const
PropertyChange & > 
PropertyChanged
 
- Public Attributes inherited from PBD::Destructible
PBD::Signal0< void > Destroyed
 
PBD::Signal0< void > DropReferences
 

Private Member Functions

int set_current_unlocked (Location *)
 
void location_changed (Location *)
 
void listen_to (Location *)
 

Private Attributes

LocationList locations
 
Locationcurrent_location
 
Glib::Threads::Mutex lock
 

Additional Inherited Members

- Static Public Attributes inherited from PBD::Stateful
static int current_state_version = 0
 
static int loading_state_version = 0
 
- Protected Member Functions inherited from ARDOUR::SessionHandleRef
virtual void session_going_away ()
 
virtual void insanity_check ()
 
- Protected Member Functions inherited from PBD::Stateful
void add_instant_xml (XMLNode &, const std::string &directory_path)
 
XMLNodeinstant_xml (const std::string &str, const std::string &directory_path)
 
void add_properties (XMLNode &)
 
PropertyChange set_values (XMLNode const &)
 
virtual void post_set (const PropertyChange &)
 
virtual void send_change (const PropertyChange &)
 
virtual void mid_thaw (const PropertyChange &)
 
- Protected Attributes inherited from ARDOUR::SessionHandleRef
ARDOUR::Session_session
 
- Protected Attributes inherited from PBD::Stateful
XMLNode_extra_xml
 
XMLNode_instant_xml
 
PBD::PropertyChange _pending_changed
 
Glib::Threads::Mutex _lock
 
std::string _xml_node_name
 name of node to use for this object in XML More...
 
OwnedPropertyList_properties
 

Detailed Description

Definition at line 164 of file location.h.

Member Typedef Documentation

Definition at line 167 of file location.h.

Constructor & Destructor Documentation

Locations::Locations ( Session s)

Definition at line 762 of file location.cc.

Locations::~Locations ( )

Definition at line 768 of file location.cc.

Member Function Documentation

void Locations::add ( Location loc,
bool  make_current = false 
)

Definition at line 953 of file location.cc.

template<class T >
void ARDOUR::Locations::apply ( T &  obj,
void(T::*)(const LocationList &)  method 
) const
inline

Definition at line 213 of file location.h.

Location * Locations::auto_loop_location ( ) const

Definition at line 1359 of file location.cc.

Location * Locations::auto_punch_location ( ) const

Definition at line 1370 of file location.cc.

void Locations::clear ( )

Definition at line 865 of file location.cc.

void Locations::clear_markers ( )

Definition at line 891 of file location.cc.

void Locations::clear_ranges ( )

Definition at line 914 of file location.cc.

Location* ARDOUR::Locations::current ( ) const
inline

Definition at line 192 of file location.h.

void Locations::find_all_between ( framepos_t  start,
framepos_t  end,
LocationList ll,
Location::Flags  flags 
)

Definition at line 1405 of file location.cc.

framepos_t Locations::first_mark_after ( framepos_t  frame,
bool  include_special_ranges = false 
)

Definition at line 1243 of file location.cc.

framepos_t Locations::first_mark_before ( framepos_t  frame,
bool  include_special_ranges = false 
)

Definition at line 1172 of file location.cc.

Location * Locations::get_location_by_id ( PBD::ID  id)

Definition at line 1394 of file location.cc.

XMLNode & Locations::get_state ( void  )
virtual

Implements PBD::Stateful.

Definition at line 1017 of file location.cc.

const LocationList& ARDOUR::Locations::list ( )
inline

Definition at line 172 of file location.h.

void ARDOUR::Locations::listen_to ( Location )
private
void ARDOUR::Locations::location_changed ( Location )
private
Location * Locations::mark_at ( framepos_t  pos,
framecnt_t  slop = 0 
) const

Definition at line 1205 of file location.cc.

void Locations::marks_either_side ( framepos_t const  frame,
framepos_t before,
framepos_t after 
) const

Look for the `marks' (either locations which are marks, or start/end points of range markers) either side of a frame. Note that if frame is exactly on a `mark', that mark will not be considered for returning as before/after.

Parameters
frameFrame to look for.
beforeFilled in with the position of the last `mark' before `frame' (or max_framepos if none exists)
afterFilled in with the position of the next `mark' after `frame' (or max_framepos if none exists)

Definition at line 1283 of file location.cc.

int Locations::next_available_name ( std::string &  result,
std::string  base 
)

Definition at line 797 of file location.cc.

uint32_t Locations::num_range_markers ( ) const

Definition at line 1381 of file location.cc.

void Locations::remove ( Location loc)

Definition at line 979 of file location.cc.

Location * Locations::session_range_location ( ) const

Definition at line 1348 of file location.cc.

int Locations::set_current ( Location loc,
bool  want_lock = true 
)

Definition at line 779 of file location.cc.

int Locations::set_current_unlocked ( Location loc)
private

Definition at line 853 of file location.cc.

int Locations::set_state ( const XMLNode node,
int  version 
)
virtual

Implements PBD::Stateful.

Definition at line 1031 of file location.cc.

Member Data Documentation

PBD::Signal1<void,Location*> ARDOUR::Locations::added

Definition at line 209 of file location.h.

PBD::Signal0<void> ARDOUR::Locations::changed

Definition at line 211 of file location.h.

PBD::Signal1<void,Location*> ARDOUR::Locations::current_changed

Definition at line 203 of file location.h.

Location* ARDOUR::Locations::current_location
private

Definition at line 228 of file location.h.

LocationList ARDOUR::Locations::locations
private

Definition at line 227 of file location.h.

Glib::Threads::Mutex ARDOUR::Locations::lock
mutableprivate

Definition at line 229 of file location.h.

PBD::Signal1<void,Location*> ARDOUR::Locations::removed

Definition at line 210 of file location.h.


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