Parameters: start a design draft
Parameters and Automation will certainly play a crucial role eventually. They will form a network of relationships to cover all further concerns that can not directly be conceptualised as arrangement or processing. A shift in the setup of the Job-Functor arguments necessitates to introduce a `Parameter` type — ''albeit just as placeholder''
This commit is contained in:
parent
793c9950d4
commit
36684ff092
4 changed files with 119 additions and 26 deletions
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
Parameter - representation of an automatable effect/plugin parameter
|
||||
Parameter - generic parameter values
|
||||
|
||||
Copyright (C)
|
||||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||||
2008,2026 Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
**Lumiera** is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
|
|
@ -15,24 +15,19 @@
|
|||
/** @file parameter.cpp
|
||||
** Implementation functions of the Parameter abstraction.
|
||||
**
|
||||
** @todo as of 2016, we still need to work out our parameter/automation concept.
|
||||
** @todo this is a draft and placeholder, as of 2026
|
||||
*/
|
||||
|
||||
|
||||
#include "lib/error.hpp"
|
||||
#include "lib/par/parameter.hpp"
|
||||
|
||||
namespace steam {
|
||||
namespace mobject {
|
||||
namespace lib {
|
||||
namespace par {
|
||||
|
||||
|
||||
template<class VAL>
|
||||
VAL
|
||||
Parameter<VAL>::getValue ()
|
||||
{
|
||||
UNIMPLEMENTED ("Any idea how to handle various kinds of parameter types");
|
||||
}
|
||||
/** */
|
||||
|
||||
|
||||
|
||||
}} // namespace mobject
|
||||
}} // namespace lib::par
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
PARAMETER.hpp - representation of an automatable effect/plugin parameter
|
||||
PARAMETER.hpp - generic parameter values
|
||||
|
||||
Copyright (C)
|
||||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||||
2008,2026 Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
**Lumiera** is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
|
|
@ -13,9 +13,9 @@
|
|||
|
||||
|
||||
/** @file parameter.hpp
|
||||
** Core abstraction: parameter to be controlled and possibly automated.
|
||||
** A generic type value that can be discovered and automated.
|
||||
**
|
||||
** @todo as of 2016, we still need to work out our parameter/automation concept.
|
||||
** @todo this is a draft and placeholder, as of 2026
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -25,29 +25,26 @@
|
|||
|
||||
|
||||
|
||||
namespace steam {
|
||||
namespace mobject {
|
||||
namespace lib {
|
||||
namespace par {
|
||||
|
||||
template<class VAL> class ParamProvider;
|
||||
|
||||
|
||||
/**
|
||||
* Descriptor and access object for a plugin parameter.
|
||||
* Parameters may be provided with values from the session,
|
||||
* and this values may be automated.
|
||||
* Descriptor and container to hold a generic parameter.
|
||||
* The value can be fixed or supplied by an automation function.
|
||||
*/
|
||||
template<class VAL>
|
||||
class Parameter
|
||||
{
|
||||
public:
|
||||
VAL getValue () ;
|
||||
template<typename VAL>
|
||||
VAL get();
|
||||
|
||||
protected:
|
||||
ParamProvider<VAL>* provider;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
}} // namespace steam::mobject
|
||||
}} // namespace lib::par
|
||||
#endif /*LIB_PAR_PARAMETER_H*/
|
||||
|
|
|
|||
7
tests/16parameter.tests
Normal file
7
tests/16parameter.tests
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
TESTING "Library Test Suite: parameters" ./test-suite --group=param
|
||||
|
||||
|
||||
|
||||
PLANNED "Parameter Values" Parameter_test <<END
|
||||
return: 0
|
||||
END
|
||||
94
tests/lib/par/parameter-test.cpp
Normal file
94
tests/lib/par/parameter-test.cpp
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
Parameter(Test) - verify generic parameter values
|
||||
|
||||
Copyright (C)
|
||||
2026, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
**Lumiera** 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. See the file COPYING for further details.
|
||||
|
||||
* *****************************************************************/
|
||||
|
||||
/** @file parameter-test.cpp
|
||||
** unit test \ref Parameter_test
|
||||
*/
|
||||
|
||||
|
||||
#include "test/run.hpp"
|
||||
//#include "test/test-helper.hpp"
|
||||
#include "lib/par/parameter.hpp"
|
||||
//#include "lib/format-cout.hpp"
|
||||
|
||||
//#include <utility>
|
||||
//#include <string>
|
||||
//#include <vector>
|
||||
|
||||
//using std::string;
|
||||
//using std::vector;
|
||||
//using std::swap;
|
||||
|
||||
|
||||
namespace lib {
|
||||
namespace par {
|
||||
namespace test{
|
||||
|
||||
// using lumiera::error::LUMIERA_ERROR_LOGIC;
|
||||
|
||||
namespace {//Test fixture....
|
||||
|
||||
class Thing
|
||||
{ };
|
||||
|
||||
template<typename X>
|
||||
struct Some
|
||||
{
|
||||
X x;
|
||||
};
|
||||
|
||||
typedef Some<Thing> SomeThing;
|
||||
|
||||
}//(End)Test fixture
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**************************************************************************//**
|
||||
* @test cover properties of generic parameter containers.
|
||||
*/
|
||||
class Parameter_test : public Test
|
||||
{
|
||||
|
||||
virtual void
|
||||
run (Arg)
|
||||
{
|
||||
simpleUsage();
|
||||
verify_typeMarker();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
simpleUsage()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
verify_typeMarker()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/** Register this test class... */
|
||||
LAUNCHER (Parameter_test, "unit lib");
|
||||
|
||||
|
||||
|
||||
}}} // namespace lib::par::test
|
||||
Loading…
Reference in a new issue