WIP: interface/framwork skeleton
This commit is contained in:
parent
529d4bd459
commit
ba37045b48
9 changed files with 479 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
65
src/proc/control/command-closure.hpp
Normal file
65
src/proc/control/command-closure.hpp
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
COMMAND-CLOSURE.hpp - defining execution targets and parameters for commands
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2009, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
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 <tr1/memory>
|
||||
|
||||
|
||||
|
||||
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
|
||||
48
src/proc/control/command.cpp
Normal file
48
src/proc/control/command.cpp
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
Command - Key abstraction for proc/edit operations and UNDO management
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
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 <boost/format.hpp>
|
||||
//using boost::str;
|
||||
|
||||
namespace control {
|
||||
|
||||
/** */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace control
|
||||
69
src/proc/control/command.hpp
Normal file
69
src/proc/control/command.hpp
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
COMMAND.hpp - Key abstraction for proc/edit operations and UNDO management
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2009, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
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 <tr1/memory>
|
||||
|
||||
///////////////////////////////////////////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
|
||||
41
src/proc/control/handling-pattern.cpp
Normal file
41
src/proc/control/handling-pattern.cpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
HandlingPattern - A skeleton for executing commands, including standard implementations
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
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 <boost/format.hpp>
|
||||
//using boost::str;
|
||||
|
||||
namespace control {
|
||||
|
||||
/** */
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////TODO: is this implementation file actually required??
|
||||
|
||||
|
||||
} // namespace control
|
||||
68
src/proc/control/handling-pattern.hpp
Normal file
68
src/proc/control/handling-pattern.hpp
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
HANDLILNG-PATTERN.hpp - A skeleton for executing commands, including standard implementations
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2009, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
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 <tr1/memory>
|
||||
|
||||
|
||||
|
||||
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
|
||||
77
src/proc/control/mutation.hpp
Normal file
77
src/proc/control/mutation.hpp
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
MUTATION.hpp - a functor encapsulating the actual operation of a proc-Command
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2009, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
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 <tr1/memory>
|
||||
|
||||
|
||||
|
||||
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
|
||||
41
src/proc/control/proc-dispatcher.cpp
Normal file
41
src/proc/control/proc-dispatcher.cpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
ProcDispatcher - Proc-Layer command dispatch and execution
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
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 <boost/format.hpp>
|
||||
//using boost::str;
|
||||
|
||||
namespace control {
|
||||
|
||||
/** */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace control
|
||||
67
src/proc/control/proc-dispatcher.hpp
Normal file
67
src/proc/control/proc-dispatcher.hpp
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
PROC-DISPATCHER.hpp - Proc-Layer command dispatch and execution
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2009, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
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 <tr1/memory>
|
||||
|
||||
|
||||
|
||||
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
|
||||
Loading…
Reference in a new issue