summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/export_multiplication.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
committerDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
commitbb9cc45cd22af67ac275a5e73accbe14fee664d8 (patch)
treee52977d3eae6ff07b856088041a080a2fa3e5b79 /libs/ardour/ardour/export_multiplication.h
parent8c4ce1e2ce35571aed5a686671431fdfffae7f8c (diff)
Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/export_multiplication.h')
-rw-r--r--libs/ardour/ardour/export_multiplication.h74
1 files changed, 37 insertions, 37 deletions
diff --git a/libs/ardour/ardour/export_multiplication.h b/libs/ardour/ardour/export_multiplication.h
index c8fd20c60e..4826a35668 100644
--- a/libs/ardour/ardour/export_multiplication.h
+++ b/libs/ardour/ardour/export_multiplication.h
@@ -12,42 +12,42 @@
public:
GraphNode ();
virtual ~GraphNode ();
-
+
uint32_t id() const { return _id; }
-
+
/* Children and parents. Note: only children are kept in order! */
-
+
list<GraphNode *> const & get_parents () const { return parents; }
-
+
void add_child (GraphNode * child, GraphNode * left_sibling);
void remove_child (GraphNode * child);
GraphNode * first_child () const { return children.front(); }
GraphNode * last_child () const { return children.back(); }
list<GraphNode *> const & get_children () const { return children; }
-
+
/* Relation functions */
-
+
bool is_ancestor_of (GraphNode const * node) const;
bool is_descendant_of (GraphNode const * node) const;
bool equals (GraphNode const * node) const { return node == this; }
-
+
/* Selection functions */
-
+
bool selected () const { return _selected; }
void select (bool value);
-
+
sigc::signal<void, bool> SelectChanged;
-
+
protected:
-
+
/* Parent manipulation functions should be used only from child manipulation functions! */
-
+
void add_parent (GraphNode * parent);
void remove_parent (GraphNode * parent);
-
+
list<GraphNode *> parents;
list<GraphNode *> children;
-
+
bool _selected;
uint32_t _id;
static uint32_t id_counter;
@@ -60,10 +60,10 @@
typedef boost::shared_ptr<T> DataPtr;
typedef boost::shared_ptr<DataNode<T> > SelfPtr;
typedef boost::weak_ptr<DataNode<T> > WeakSelfPtr;
-
+
DataNode (DataPtr data) : _data (data) {}
void set_self_ptr (boost::shared_ptr<DataNode<T> > ptr) { _self_ptr = ptr; }
-
+
public:
static SelfPtr create (T * data)
{
@@ -71,14 +71,14 @@
ptr->set_self_ptr (ptr);
return ptr;
}
-
+
static SelfPtr create (DataPtr data)
{
SelfPtr ptr = SelfPtr (new DataNode<T> (data));
ptr->set_self_ptr (ptr);
return ptr;
}
-
+
DataPtr data() { return _data; }
SelfPtr self_ptr () { return _self_ptr.lock(); }
@@ -87,7 +87,7 @@
{
parents.sort (NodeSorter<P> (sort_list));
}
-
+
private:
DataPtr _data;
WeakSelfPtr _self_ptr;
@@ -95,14 +95,14 @@
private:
/* Sorts GraphNodes according to a list of DataNodes */
-
+
template<typename T>
class NodeSorter {
public:
typedef list<boost::shared_ptr<DataNode<T> > > ListType;
-
+
NodeSorter (ListType const & list) : list (list) {}
-
+
bool operator() (GraphNode * one, GraphNode * other) // '<' operator
{
if (one == other) { return false; } // Strict weak ordering
@@ -114,12 +114,12 @@
return false;
}
}
-
+
std::cerr << "Invalid comparison list given to NodeSorter" << std::endl;
-
+
abort();
}
-
+
private:
ListType const & list;
};
@@ -129,16 +129,16 @@
typedef DataNode<TimespanState> TimespanNode;
typedef boost::shared_ptr<TimespanNode> TimespanNodePtr;
-
+
typedef DataNode<ChannelConfigState> ChannelConfigNode;
typedef boost::shared_ptr<ChannelConfigNode> ChannelConfigNodePtr;
-
+
typedef DataNode<FormatState> FormatNode;
typedef boost::shared_ptr<FormatNode> FormatNodePtr;
-
+
typedef DataNode<FilenameState> FilenameNode;
typedef boost::shared_ptr<FilenameNode> FilenameNodePtr;
-
+
struct MultiplicationGraph {
list<TimespanNodePtr> timespans;
list<ChannelConfigNodePtr> channel_configs;
@@ -147,35 +147,35 @@
};
MultiplicationGraph const & get_graph () { return graph; }
-
+
void split_node (GraphNode * node, float position);
void remove_node (GraphNode * node);
-
+
sigc::signal<void> GraphChanged;
private:
void purge_graph ();
-
+
template<typename T>
static void insert_after (list<T> & the_list, T const & position, T const & element);
-
+
template<typename T>
static void remove_by_element (list<T> & the_list, T const & element);
-
+
bool nodes_have_one_common_child (list<GraphNode *> const & the_list);
list<GraphNode *>::const_iterator end_of_common_child_range (list<GraphNode *> const & the_list, list<GraphNode *>::const_iterator beginning);
void split_node_at_position (GraphNode * old_node, GraphNode * new_node, float position);
-
+
void split_timespan (TimespanNodePtr node, float position = 0.5);
void split_channel_config (ChannelConfigNodePtr node, float position = 0.5);
void split_format (FormatNodePtr node, float position = 0.5);
void split_filename (FilenameNodePtr node, float position = 0.5);
-
+
void duplicate_timespan_children (TimespanNodePtr source, TimespanNodePtr target, GraphNode * insertion_point = 0);
void duplicate_channel_config_children (ChannelConfigNodePtr source, ChannelConfigNodePtr target, GraphNode * insertion_point = 0);
void duplicate_format_children (FormatNodePtr source, FormatNodePtr target, GraphNode * insertion_point = 0);
-
+
TimespanNodePtr duplicate_timespan_node (TimespanNodePtr node);
ChannelConfigNodePtr duplicate_channel_config_node (ChannelConfigNodePtr node);
FormatNodePtr duplicate_format_node (FormatNodePtr node);