Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plugin-GUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yehaojie
plugin-GUI
Commits
c8f84e6d
Commit
c8f84e6d
authored
12 years ago
by
jsiegle
Browse files
Options
Downloads
Patches
Plain Diff
Added Parameter class
parent
56dcdad4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/Processors/Parameter.cpp
+10
-0
10 additions, 0 deletions
Source/Processors/Parameter.cpp
Source/Processors/Parameter.h
+135
-0
135 additions, 0 deletions
Source/Processors/Parameter.h
with
145 additions
and
0 deletions
Source/Processors/Parameter.cpp
0 → 100644
+
10
−
0
View file @
c8f84e6d
/*
==============================================================================
Parameter.cpp
Created: 5 Apr 2012 11:39:25am
Author: jsiegle
==============================================================================
*/
This diff is collapsed.
Click to expand it.
Source/Processors/Parameter.h
0 → 100644
+
135
−
0
View file @
c8f84e6d
/*
------------------------------------------------------------------
This file is part of the Open Ephys GUI
Copyright (C) 2012 Open Ephys
------------------------------------------------------------------
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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PARAMETER_H_62922AE5__
#define __PARAMETER_H_62922AE5__
#include
"../../JuceLibraryCode/JuceHeader.h"
#include
"Editors/GenericEditor.h"
#include
"../AccessClass.h"
#include
<stdio.h>
/**
Class for holding user-definable processor parameters.
@see GenericProcessor, GenericEditor
*/
class
Parameter
:
{
public:
Parameter
(
const
String
name_
);
~
Parameter
();
const
String
getName
()
{
return
name
;}
virtual
Array
<
var
>
getPossibleValues
()
{
return
possibleValues
}
virtual
void
setValue
(
var
val
,
int
chan
);
var
getValue
(
int
chan
);
var
operator
[](
int
chan
);
virtual
bool
isBoolean
()
{
return
false
;}
virtual
bool
isContinuous
()
{
return
false
;}
virtual
bool
isDiscrete
()
{
return
false
;}
virtual
bool
isString
()
{
return
false
;}
protected
:
const
String
name
;
GenericProcessor
*
processor
;
GenericEditor
*
editor
;
Array
<
Channel
*>
channels
;
Array
<
var
>
possibleValues
;
Array
<
var
>
values
;
};
class
BooleanParameter
:
public
Parameter
{
public:
BooleanParameter
(
const
String
name_
);
~
BooleanParameter
();
Array
<
var
>
getPossibleValues
()
{
Array
<
var
>
possibleValues
;
possibleValues
.
add
(
true
);
possibleValues
.
add
(
false
);
return
possibleValues
;
}
bool
isBoolean
()
{
return
true
;}
};
class
ContinuousParameter
:
public
Parameter
{
public:
ContinuousParameter
(
const
String
name_
,
double
low
,
double
high
);
~
ContinuousParameter
();
Array
<
var
>
getPossibleValues
()
{
Array
<
var
>
possibleValues
;
possibleValues
.
add
(
low
);
possibleValues
.
add
(
high
);
return
possibleValues
;
}
bool
isContinuous
()
{
return
true
;}
private
:
double
low
,
high
;
};
class
DiscreteParameter
:
public
Parameter
{
public:
DiscreteParameter
(
const
String
name_
,
Array
<
var
>
possibleValues
);
~
DiscreteParameter
();
Array
<
var
>
getPossibleValues
()
{
return
possibleValues
;
}
bool
isContinuous
()
{
return
true
;}
private
:
Array
<
var
>
possibleValues
;
};
#endif // __PARAMETER_H_62922AE5__
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment