Skip to content

Commit b2318ac

Browse files
committed
Apply formatting
1 parent e99a63e commit b2318ac

File tree

6 files changed

+450
-407
lines changed

6 files changed

+450
-407
lines changed

.clang-format

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: JUCE (Custom)
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlines: Left
9+
AlignOperands: Align
10+
AlignTrailingComments: false
11+
AllowAllParametersOfDeclarationOnNextLine: false
12+
AllowShortBlocksOnASingleLine: Never
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: All
15+
AllowShortIfStatementsOnASingleLine: Never
16+
AllowShortLoopsOnASingleLine: false
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakAfterReturnType: None
19+
AlwaysBreakBeforeMultilineStrings: false
20+
AlwaysBreakTemplateDeclarations: Yes
21+
BinPackArguments: false
22+
BinPackParameters: false
23+
BreakAfterJavaFieldAnnotations: false
24+
BreakBeforeBinaryOperators: NonAssignment
25+
BreakBeforeBraces: Allman
26+
BreakBeforeTernaryOperators: true
27+
BreakConstructorInitializers: BeforeColon
28+
BreakInheritanceList : BeforeColon
29+
BreakStringLiterals: false
30+
ColumnLimit: 0
31+
# ConstructorInitializerAllOnOneLineOrOnePerLine: true
32+
ConstructorInitializerIndentWidth: 4
33+
ContinuationIndentWidth: 4
34+
Cpp11BracedListStyle: false
35+
DerivePointerAlignment: false
36+
DisableFormat: false
37+
ExperimentalAutoDetectBinPacking: false
38+
IndentCaseLabels: true
39+
IndentWidth: 4
40+
IndentWrappedFunctionNames: true
41+
KeepEmptyLinesAtTheStartOfBlocks: false
42+
MaxEmptyLinesToKeep: 1
43+
NamespaceIndentation: Inner
44+
PackConstructorInitializers: CurrentLine
45+
PointerAlignment: Left
46+
ReflowComments: false
47+
SortIncludes: true
48+
SpaceAfterCStyleCast: true
49+
SpaceAfterLogicalNot: true
50+
SpaceBeforeAssignmentOperators: true
51+
SpaceBeforeCpp11BracedList: true
52+
SpaceBeforeParens: NonEmptyParentheses
53+
SpaceInEmptyParentheses: false
54+
SpaceBeforeInheritanceColon: true
55+
SpacesInAngles: false
56+
SpacesInCStyleCastParentheses: false
57+
SpacesInContainerLiterals: true
58+
SpacesInParentheses: false
59+
SpacesInSquareBrackets: false
60+
Standard: "c++17"
61+
TabWidth: 4
62+
UseTab: Never
63+
---
64+

Source/OpenEphysLib.cpp

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,59 +25,59 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2525
#include "PythonProcessor.h"
2626
#include <string>
2727

28-
#ifdef WIN32
28+
#ifdef _WIN32
2929
#include <Windows.h>
30-
#define EXPORT __declspec(dllexport)
30+
#define EXPORT __declspec (dllexport)
3131
#else
32-
#define EXPORT __attribute__((visibility("default")))
32+
#define EXPORT __attribute__ ((visibility ("default")))
3333
#endif
3434

3535
using namespace Plugin;
3636

3737
#define NUM_PLUGINS 1
3838

39-
extern "C" EXPORT void getLibInfo(Plugin::LibraryInfo* info)
39+
extern "C" EXPORT void getLibInfo (Plugin::LibraryInfo* info)
4040
{
41-
/* API version, defined by the GUI source.
41+
/* API version, defined by the GUI source.
4242
Should not be changed to ensure it is always equal to the one used in the latest codebase.
4343
The GUI refueses to load plugins with mismatched API versions */
44-
info->apiVersion = PLUGIN_API_VER;
45-
info->name = "Python Processor"; // <---- update
46-
info->libVersion = "0.1.0"; // <---- update
47-
info->numPlugins = NUM_PLUGINS;
44+
info->apiVersion = PLUGIN_API_VER;
45+
info->name = "Python Processor"; // <---- update
46+
info->libVersion = "0.1.0"; // <---- update
47+
info->numPlugins = NUM_PLUGINS;
4848
}
4949

50-
extern "C" EXPORT int getPluginInfo(int index, Plugin::PluginInfo* info)
50+
extern "C" EXPORT int getPluginInfo (int index, Plugin::PluginInfo* info)
5151
{
52-
switch (index)
53-
{
54-
//one case per plugin. This example is for a processor which connects directly to the signal chain
55-
case 0:
56-
//Type of plugin. See "Source/Processors/PluginManager/OpenEphysPlugin.h" for complete info about the different type structures
57-
info->type = Plugin::Type::PROCESSOR;
58-
59-
//Processor name
60-
info->processor.name = "Python Processor"; //Processor name shown in the GUI
61-
62-
//Type of processor. Can be FILTER, SOURCE, SINK or UTILITY. Specifies where on the processor list will appear
63-
info->processor.type = Processor::Type::FILTER;
64-
65-
//Class factory pointer. Replace "ProcessorPluginSpace::ProcessorPlugin" with the namespace and class name.
66-
info->processor.creator = &(Plugin::createProcessor<PythonProcessor>);
67-
break;
68-
default:
69-
return -1;
70-
break;
71-
}
72-
return 0;
52+
switch (index)
53+
{
54+
//one case per plugin. This example is for a processor which connects directly to the signal chain
55+
case 0:
56+
//Type of plugin. See "Source/Processors/PluginManager/OpenEphysPlugin.h" for complete info about the different type structures
57+
info->type = Plugin::Type::PROCESSOR;
58+
59+
//Processor name
60+
info->processor.name = "Python Processor"; //Processor name shown in the GUI
61+
62+
//Type of processor. Can be FILTER, SOURCE, SINK or UTILITY. Specifies where on the processor list will appear
63+
info->processor.type = Processor::Type::FILTER;
64+
65+
//Class factory pointer. Replace "ProcessorPluginSpace::ProcessorPlugin" with the namespace and class name.
66+
info->processor.creator = &(Plugin::createProcessor<PythonProcessor>);
67+
break;
68+
default:
69+
return -1;
70+
break;
71+
}
72+
return 0;
7373
}
7474

7575
#ifdef WIN32
76-
BOOL WINAPI DllMain(IN HINSTANCE hDllHandle,
77-
IN DWORD nReason,
78-
IN LPVOID Reserved)
76+
BOOL WINAPI DllMain (IN HINSTANCE hDllHandle,
77+
IN DWORD nReason,
78+
IN LPVOID Reserved)
7979
{
80-
return TRUE;
80+
return TRUE;
8181
}
8282

8383
#endif

0 commit comments

Comments
 (0)