/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <glibmm/thread.h>
#include "pbd/undo.h"
-#include "pbd/stateful.h"
-#include "pbd/statefuldestructible.h"
+#include "pbd/stateful.h"
+#include "pbd/statefuldestructible.h"
#include "ardour/ardour.h"
};
Location (nframes64_t sample_start,
- nframes64_t sample_end,
- const std::string &name,
- Flags bits = Flags(0))
-
+ nframes64_t sample_end,
+ const std::string &name,
+ Flags bits = Flags(0))
+
: _name (name),
_start (sample_start),
_end (sample_end),
_flags (bits),
_locked (false) { }
-
+
Location () {
_start = 0;
_end = 0;
bool locked() const { return _locked; }
void lock() { _locked = true; changed (this); }
void unlock() { _locked = false; changed (this); }
-
+
nframes64_t start() const { return _start; }
nframes64_t end() const { return _end; }
nframes64_t length() const { return _end - _start; }
/* this is sent only when both start&end change at the same time */
sigc::signal<void,Location*> changed;
-
+
/* CD Track / CD-Text info */
std::map<std::string, std::string> cd_info;
XMLNode& cd_info_node (const std::string &, const std::string &);
XMLNode& get_state (void);
- int set_state (const XMLNode&);
+ int set_state (const XMLNode&, int version);
private:
std::string _name;
Locations ();
~Locations ();
-
+
const LocationList& list() { return locations; }
void add (Location *, bool make_current = false);
void clear_ranges ();
XMLNode& get_state (void);
- int set_state (const XMLNode&);
+ int set_state (const XMLNode&, int version);
Location *get_location_by_id(PBD::ID);
Location* auto_loop_location () const;