From a95e7fe2754e7c8a7a067bb0280d3de18705a5e9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 13 Apr 2016 00:07:28 +0200 Subject: yet more documentation.. --- libs/ardour/ardour/session.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'libs/ardour/ardour/session.h') diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 9f8102c928..137b6f04d6 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -875,14 +875,37 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop std::string next_undo() const { return _history.next_undo(); } std::string next_redo() const { return _history.next_redo(); } + /** begin collecting undo information + * + * This call must always be followed by either + * begin_reversible_command() or commit_reversible_command() + * + * @param cmd_name human readable name for the undo operation + */ void begin_reversible_command (const std::string& cmd_name); void begin_reversible_command (GQuark); + /** abort an open undo command + * This must only be called after begin_reversible_command () + */ void abort_reversible_command (); + /** finalize an undo command and commit pending transactions + * + * This must only be called after begin_reversible_command () + * @param cmd (additional) command to add + */ void commit_reversible_command (Command* cmd = 0); void add_command (Command *const cmd); - PBD::StatefulDiffCommand* add_stateful_diff_command (boost::shared_ptr); + /** create an StatefulDiffCommand from the given object and add it to the stack. + * + * This function must only be called after begin_reversible_command. + * Failing to do so may lead to a crash. + * + * @param sfd the object to diff + * @returns the allocated StatefulDiffCommand (already added via add_command) + */ + PBD::StatefulDiffCommand* add_stateful_diff_command (boost::shared_ptr sfd); /** @return The list of operations that are currently in progress */ std::list const & current_operations () { -- cgit v1.2.3