Skip to content

Commit

Permalink
Apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaldoshi committed Oct 4, 2024
1 parent 18f0161 commit ed9eb7d
Show file tree
Hide file tree
Showing 6 changed files with 374 additions and 356 deletions.
64 changes: 64 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
Language: Cpp
# BasedOnStyle: JUCE (Custom)
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakAfterJavaFieldAnnotations: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList : BeforeColon
BreakStringLiterals: false
ColumnLimit: 0
# ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
PackConstructorInitializers: CurrentLine
PointerAlignment: Left
ReflowComments: false
SortIncludes: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeParens: NonEmptyParentheses
SpaceInEmptyParentheses: false
SpaceBeforeInheritanceColon: true
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: "c++17"
TabWidth: 4
UseTab: Never
---

92 changes: 46 additions & 46 deletions Source/OpenEphysLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,76 +20,76 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <PluginInfo.h>
#include "PanelBase.h"
#include <PluginInfo.h>
#include <string>

#ifdef _WIN32
#include <Windows.h>
#define EXPORT __declspec(dllexport)
#define EXPORT __declspec (dllexport)
#else
#define EXPORT __attribute__((visibility("default")))
#define EXPORT __attribute__ ((visibility ("default")))
#endif

using namespace Plugin;
//Number of plugins defined on the library. Can be of different types (Processors, RecordEngines, etc...)
#define NUM_PLUGINS 2

extern "C" EXPORT void getLibInfo(Plugin::LibraryInfo* info)
extern "C" EXPORT void getLibInfo (Plugin::LibraryInfo* info)
{
/* API version, defined by the GUI source.
/* API version, defined by the GUI source.
Should not be changed to ensure it is always equal to the one used in the latest codebase.
The GUI refueses to load plugins with mismatched API versions */
info->apiVersion = PLUGIN_API_VER;
info->apiVersion = PLUGIN_API_VER;

//Name of the Library, used only for information
info->name = "TTL Panels";
//Name of the Library, used only for information
info->name = "TTL Panels";

//Version of the library, used only for information
info->libVersion = "0.1.0";
info->numPlugins = NUM_PLUGINS;
//Version of the library, used only for information
info->libVersion = "0.1.0";
info->numPlugins = NUM_PLUGINS;
}

extern "C" EXPORT int getPluginInfo(int index, Plugin::PluginInfo* info)
extern "C" EXPORT int getPluginInfo (int index, Plugin::PluginInfo* info)
{
switch (index)
{
//one case per plugin.
case 0:
// Sources, sinks, and visualizers are all "processors".
info->type = Plugin::Type::PROCESSOR;
//Processor name shown in the GUI.
info->processor.name = "TTL Toggle Panel";
//Type of processor.
info->processor.type = Plugin::Processor::FILTER;
//Class factory pointer. Namespace and class name.
info->processor.creator = &(Plugin::createProcessor<TTLDebugTools::TTLTogglePanel>);
break;

case 1:
// Sources, sinks, and visualizers are all "processors".
info->type = Plugin::Type::PROCESSOR;
//Processor name shown in the GUI.
info->processor.name = "TTL Display Panel";
//Type of processor.
info->processor.type = Plugin::Processor::SINK;
//Class factory pointer. Namespace and class name.
info->processor.creator = &(Plugin::createProcessor<TTLDebugTools::TTLFrontPanel>);
break;

default:
return -1;
break;
}
return 0;
switch (index)
{
//one case per plugin.
case 0:
// Sources, sinks, and visualizers are all "processors".
info->type = Plugin::Type::PROCESSOR;
//Processor name shown in the GUI.
info->processor.name = "TTL Toggle Panel";
//Type of processor.
info->processor.type = Plugin::Processor::FILTER;
//Class factory pointer. Namespace and class name.
info->processor.creator = &(Plugin::createProcessor<TTLDebugTools::TTLTogglePanel>);
break;

case 1:
// Sources, sinks, and visualizers are all "processors".
info->type = Plugin::Type::PROCESSOR;
//Processor name shown in the GUI.
info->processor.name = "TTL Display Panel";
//Type of processor.
info->processor.type = Plugin::Processor::SINK;
//Class factory pointer. Namespace and class name.
info->processor.creator = &(Plugin::createProcessor<TTLDebugTools::TTLFrontPanel>);
break;

default:
return -1;
break;
}
return 0;
}

#ifdef WIN32
BOOL WINAPI DllMain(IN HINSTANCE hDllHandle,
IN DWORD nReason,
IN LPVOID Reserved)
BOOL WINAPI DllMain (IN HINSTANCE hDllHandle,
IN DWORD nReason,
IN LPVOID Reserved)
{
return TRUE;
return TRUE;
}

#endif
Loading

0 comments on commit ed9eb7d

Please sign in to comment.