-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ca9cd7
commit 2450618
Showing
14 changed files
with
207 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#Open Ephys GUI direcroty-specific file | ||
|
||
#add files in this folder | ||
add_sources(open-ephys | ||
OpenEphysAction.cpp | ||
OpenEphysAction.h | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "OpenEphysAction.h" | ||
|
||
// Definition of the static map | ||
std::map<std::string, std::vector<OpenEphysAction*>> OpenEphysAction::actionsByKey; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include <JuceHeader.h> | ||
|
||
#include <map> | ||
#include <vector> | ||
#include <string> | ||
|
||
#ifndef OPENEPHYSACTION_H_INCLUDED | ||
#define OPENEPHYSACTION_H_INCLUDED | ||
|
||
class PLUGIN_API OpenEphysAction : public UndoableAction { | ||
public: | ||
//OpenEphysAction(GenericProcessor* p) {}; | ||
OpenEphysAction(const std::string& actionKey) : key(actionKey) { | ||
// Add this action to the static map | ||
//actionsByKey[key].push_back(this); | ||
} | ||
|
||
// Implement the UndoableAction methods | ||
bool perform() override = 0; | ||
|
||
// Implement the UndoableAction methods | ||
bool undo() override = 0; | ||
|
||
// Example static method to access actions by key | ||
/* | ||
static std::vector<OpenEphysAction*>& getActionsByKey(const std::string& actionKey) { | ||
return actionsByKey[actionKey]; | ||
} | ||
*/ | ||
virtual void restoreOwner(GenericProcessor* p) = 0; | ||
|
||
String getIdentifier() { | ||
return key; | ||
} | ||
|
||
private: | ||
|
||
GenericProcessor* processor; | ||
//std::string key; // Private member to store the action key | ||
|
||
// Static map to store actions by keys | ||
//static std::map<std::string, std::vector<OpenEphysAction*>> actionsByKey; | ||
std::string key; | ||
}; | ||
|
||
#endif // OPENEPHYSACTION_H_INCLUDED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.