diff --git a/src/proc/Makefile.am b/src/proc/Makefile.am index 3c87d3695..8480e0703 100644 --- a/src/proc/Makefile.am +++ b/src/proc/Makefile.am @@ -120,6 +120,9 @@ liblumiproccontrol_la_CFLAGS = $(AM_CFLAGS) -std=gnu99 -Wall -Wextra -Werror liblumiproccontrol_la_CXXFLAGS = $(AM_CXXFLAGS) -Wall -Wextra liblumiproccontrol_la_SOURCES = \ + $(liblumiproccontrol_la_srcdir)/command.cpp \ + $(liblumiproccontrol_la_srcdir)/handling-pattern.cpp \ + $(liblumiproccontrol_la_srcdir)/proc-dispatcher.cpp \ $(liblumiproccontrol_la_srcdir)/pathmanager.cpp \ $(liblumiproccontrol_la_srcdir)/stypemanager.cpp diff --git a/src/proc/control/command-closure.hpp b/src/proc/control/command-closure.hpp new file mode 100644 index 000000000..8b38eacab --- /dev/null +++ b/src/proc/control/command-closure.hpp @@ -0,0 +1,65 @@ +/* + COMMAND-CLOSURE.hpp - defining execution targets and parameters for commands + + Copyright (C) Lumiera.org + 2009, Hermann Vosseler + + 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 the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +/** @file command-closure.hpp + ** A closure enabling self-contained execution of commands within the ProcDispatcher. + ** //TODO + ** + ** @see Command + ** @see ProcDispatcher + ** + */ + + + +#ifndef CONTROL_COMMAND_CLOSURE_H +#define CONTROL_COMMAND_CLOSURE_H + +//#include "pre.hpp" + +//#include + + + +namespace control { + +// using lumiera::Symbol; +// using std::tr1::shared_ptr; + + + /** + * @todo Type-comment + */ + class CommandClosure + { + + public: + + }; + ////////////////TODO currently just fleshing out the API.... + + + + +} // namespace control +#endif diff --git a/src/proc/control/command.cpp b/src/proc/control/command.cpp new file mode 100644 index 000000000..e0d82fdf7 --- /dev/null +++ b/src/proc/control/command.cpp @@ -0,0 +1,48 @@ +/* + Command - Key abstraction for proc/edit operations and UNDO management + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + 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 the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + + +/** @file command.cpp + ** //TODO + ** + ** @see command.hpp + ** + */ + + +#include "proc/control/command.hpp" +//#include "proc/mobject/mobject-ref.hpp" +//#include "proc/mobject/mobject.hpp" +//#include "proc/mobject/placement.hpp" + +//#include +//using boost::str; + +namespace control { + + /** */ + + + + + +} // namespace control diff --git a/src/proc/control/command.hpp b/src/proc/control/command.hpp new file mode 100644 index 000000000..3939ae3d7 --- /dev/null +++ b/src/proc/control/command.hpp @@ -0,0 +1,69 @@ +/* + COMMAND.hpp - Key abstraction for proc/edit operations and UNDO management + + Copyright (C) Lumiera.org + 2009, Hermann Vosseler + + 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 the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +/** @file command.hpp + ** //TODO + ** + ** @see ProcDispatcher + ** @see Session + ** + */ + + + +#ifndef CONTROL_COMMAND_H +#define CONTROL_COMMAND_H + +//#include "pre.hpp" +#include "include/symbol.hpp" +#include "proc/control/mutation.hpp" +#include "proc/control/command-closure.hpp" + +//#include + +///////////////////////////////////////////TODO: define an C-API representation here, make the header multilingual! + + + +namespace control { + + using lumiera::Symbol; +// using std::tr1::shared_ptr; + + + /** + * @todo Type-comment + */ + class Command + { + + public: + + }; + ////////////////TODO currently just fleshing out the API.... + + + + +} // namespace control +#endif diff --git a/src/proc/control/handling-pattern.cpp b/src/proc/control/handling-pattern.cpp new file mode 100644 index 000000000..05b702c00 --- /dev/null +++ b/src/proc/control/handling-pattern.cpp @@ -0,0 +1,41 @@ +/* + HandlingPattern - A skeleton for executing commands, including standard implementations + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + 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 the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + + + +#include "proc/control/handling-pattern.hpp" +//#include "proc/mobject/mobject-ref.hpp" +//#include "proc/mobject/mobject.hpp" +//#include "proc/mobject/placement.hpp" + +//#include +//using boost::str; + +namespace control { + + /** */ + + + ///////////////////////////////////////////////////////////////////////TODO: is this implementation file actually required?? + + +} // namespace control diff --git a/src/proc/control/handling-pattern.hpp b/src/proc/control/handling-pattern.hpp new file mode 100644 index 000000000..6c7a005f7 --- /dev/null +++ b/src/proc/control/handling-pattern.hpp @@ -0,0 +1,68 @@ +/* + HANDLILNG-PATTERN.hpp - A skeleton for executing commands, including standard implementations + + Copyright (C) Lumiera.org + 2009, Hermann Vosseler + + 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 the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +/** @file handling-pattern.hpp + ** //TODO + ** + ** @see ProcDispatcher + ** @see Session + ** + */ + + + +#ifndef CONTROL_HANDLING_PATTERN_H +#define CONTROL_HANDLING_PATTERN_H + +//#include "pre.hpp" +//#include "include/symbol.hpp" + +//#include + + + +namespace control { + + using lumiera::Symbol; +// using std::tr1::shared_ptr; + + + class Command; + + + /** + * @todo Type-comment + */ + class HandlingPattern + { + + public: + + }; + ////////////////TODO currently just fleshing out the API.... + + + + +} // namespace control +#endif diff --git a/src/proc/control/mutation.hpp b/src/proc/control/mutation.hpp new file mode 100644 index 000000000..d0791ecd2 --- /dev/null +++ b/src/proc/control/mutation.hpp @@ -0,0 +1,77 @@ +/* + MUTATION.hpp - a functor encapsulating the actual operation of a proc-Command + + Copyright (C) Lumiera.org + 2009, Hermann Vosseler + + 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 the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +/** @file mutation.hpp + ** The core of a proc-Layer command: functor containing the actual operation to be executed. + ** //TODO + ** + ** @see Command + ** @see ProcDispatcher + ** + */ + + + +#ifndef CONTROL_MUTATION_H +#define CONTROL_MUTATION_H + +//#include "pre.hpp" + +//#include + + + +namespace control { + +// using lumiera::Symbol; +// using std::tr1::shared_ptr; + + + /** + * @todo Type-comment + */ + class Mutation + { + + public: + + }; + + + /** + * @todo Type-comment + */ + class UndoMutation + : public Mutation + { + + public: + + }; + ////////////////TODO currently just fleshing out the API.... + + + + +} // namespace control +#endif diff --git a/src/proc/control/proc-dispatcher.cpp b/src/proc/control/proc-dispatcher.cpp new file mode 100644 index 000000000..a20fabe90 --- /dev/null +++ b/src/proc/control/proc-dispatcher.cpp @@ -0,0 +1,41 @@ +/* + ProcDispatcher - Proc-Layer command dispatch and execution + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + 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 the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + + + +#include "proc/control/proc-dispatcher.hpp" +//#include "proc/mobject/mobject-ref.hpp" +//#include "proc/mobject/mobject.hpp" +//#include "proc/mobject/placement.hpp" + +//#include +//using boost::str; + +namespace control { + + /** */ + + + + + +} // namespace control diff --git a/src/proc/control/proc-dispatcher.hpp b/src/proc/control/proc-dispatcher.hpp new file mode 100644 index 000000000..d6e221838 --- /dev/null +++ b/src/proc/control/proc-dispatcher.hpp @@ -0,0 +1,67 @@ +/* + PROC-DISPATCHER.hpp - Proc-Layer command dispatch and execution + + Copyright (C) Lumiera.org + 2009, Hermann Vosseler + + 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 the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +/** @file proc-dispatcher.hpp + ** Dispatch and execute mutation operations on the High-level model. + ** //TODO + ** + ** @see Command + ** @see Session + ** + */ + + + +#ifndef CONTROL_PROC_DISPATCHER_H +#define CONTROL_PROC_DISPATCHER_H + +//#include "pre.hpp" +//#include "include/symbol.hpp" +#include "proc/control/command.hpp" + +//#include + + + +namespace control { + + using lumiera::Symbol; +// using std::tr1::shared_ptr; + + + /** + * @todo Type-comment + */ + class ProcDispatcher + { + + public: + + }; + ////////////////TODO currently just fleshing out the API.... + + + + +} // namespace control +#endif