Skip to content

Commit

Permalink
Apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaldoshi committed Oct 10, 2024
1 parent 7d16895 commit 69741ed
Show file tree
Hide file tree
Showing 9 changed files with 1,148 additions and 1,183 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
---

52 changes: 26 additions & 26 deletions Source/OpenEphysLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,50 +27,50 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#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;

#define NUM_PLUGINS 1

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->name = "Tracking Plugin"; // <---- update
info->libVersion = "0.2.2"; // <---- update
info->numPlugins = NUM_PLUGINS;
info->apiVersion = PLUGIN_API_VER;
info->name = "Tracking Plugin"; // <---- update
info->libVersion = "0.2.2"; // <---- update
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)
{
case 0:
info->type = Plugin::Type::PROCESSOR;
info->processor.name = "Tracking Plugin"; // Processor name shown in the GUI
info->processor.type = Processor::Type::FILTER;
info->processor.creator = &(Plugin::createProcessor<TrackingNode>);
break;
switch (index)
{
case 0:
info->type = Plugin::Type::PROCESSOR;
info->processor.name = "Tracking Plugin"; // Processor name shown in the GUI
info->processor.type = Processor::Type::FILTER;
info->processor.creator = &(Plugin::createProcessor<TrackingNode>);
break;

default:
return -1;
break;
}
return 0;
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
12 changes: 8 additions & 4 deletions Source/TrackingMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,20 @@

#include <ProcessorHeaders.h>

struct TrackingPosition {
struct TrackingPosition
{
float x;
float y;
float width;
float height;
};

struct TrackingData {
struct TrackingData
{
uint64 timestamp;
TrackingPosition position;
friend std::ostream &operator<<(std::ostream &stream, const TrackingData &td){
friend std::ostream& operator<< (std::ostream& stream, const TrackingData& td)
{
stream << "x: " << td.position.x << std::endl;
stream << "y: " << td.position.y << std::endl;
stream << "width: " << td.position.width << std::endl;
Expand All @@ -64,7 +67,8 @@ struct TrackingSources
String name;
String color;
bool positionInsideACircle;
friend std::ostream &operator<<(std::ostream &stream, const TrackingSources &ts){
friend std::ostream& operator<< (std::ostream& stream, const TrackingSources& ts)
{
stream << "name: " << ts.name << std::endl;
stream << "Color: " << ts.color << std::endl;
stream << "x: " << ts.x_pos << std::endl;
Expand Down
Loading

0 comments on commit 69741ed

Please sign in to comment.