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
d0011507
Commit
d0011507
authored
8 years ago
by
Aaron Cuevas Lopez
Browse files
Options
Downloads
Patches
Plain Diff
Add template instantiations to SpikeEvent
parent
5935e12c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/Processors/Events/Events.cpp
+27
-4
27 additions, 4 deletions
Source/Processors/Events/Events.cpp
with
27 additions
and
4 deletions
Source/Processors/Events/Events.cpp
+
27
−
4
View file @
d0011507
...
...
@@ -328,7 +328,7 @@ TextEvent* TextEvent::createTextEvent(const EventChannel* channelInfo, uint64 ti
return
new
TextEvent
(
channelInfo
,
timestamp
,
channel
,
text
);
}
TextEvent
*
TextEvent
::
createTextEvent
(
const
EventChannel
*
channelInfo
,
uint64
timestamp
,
const
String
&
text
,
const
MetaDataValueArray
&
metaData
,
uint16
channel
=
0
)
TextEvent
*
TextEvent
::
createTextEvent
(
const
EventChannel
*
channelInfo
,
uint64
timestamp
,
const
String
&
text
,
const
MetaDataValueArray
&
metaData
,
uint16
channel
)
{
if
(
!
createChecks
(
channelInfo
,
EventChannel
::
TEXT
,
channel
,
metaData
))
{
...
...
@@ -447,7 +447,7 @@ void BinaryEvent::serialize(void* dstBuffer, size_t dstSize) const
template
<
typename
T
>
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
(
const
EventChannel
*
channelInfo
,
uint64
timestamp
,
const
T
*
data
,
int
dataSize
,
uint16
channel
)
{
EventChannel
::
EventChannelTypes
type
=
get
Channel
<
T
>
();
EventChannel
::
EventChannelTypes
type
=
get
Type
<
T
>
();
if
(
type
==
EventChannel
::
INVALID
)
{
jassertfalse
;
...
...
@@ -472,7 +472,7 @@ BinaryEvent* BinaryEvent::createBinaryEvent(const EventChannel* channelInfo, uin
template
<
typename
T
>
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
(
const
EventChannel
*
channelInfo
,
uint64
timestamp
,
const
T
*
data
,
int
dataSize
,
const
MetaDataValueArray
&
metaData
,
uint16
channel
)
{
EventChannel
::
EventChannelTypes
type
=
get
Channel
<
T
>
();
EventChannel
::
EventChannelTypes
type
=
get
Type
<
T
>
();
if
(
type
==
EventChannel
::
INVALID
)
{
jassertfalse
;
...
...
@@ -750,4 +750,27 @@ SpikeEvent* SpikeEvent::deserializeFromMessage(const MidiMessage& msg, const Spi
jassertfalse
;
return
nullptr
;
}
}
\ No newline at end of file
}
//Template definitions
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
int8
>(
const
EventChannel
*
,
uint64
,
const
int8
*
data
,
int
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
uint8
>(
const
EventChannel
*
,
uint64
,
const
uint8
*
data
,
int
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
int16
>(
const
EventChannel
*
,
uint64
,
const
int16
*
data
,
int
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
uint16
>(
const
EventChannel
*
,
uint64
,
const
uint16
*
data
,
int
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
int32
>(
const
EventChannel
*
,
uint64
,
const
int32
*
data
,
int
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
uint32
>(
const
EventChannel
*
,
uint64
,
const
uint32
*
data
,
int
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
int64
>(
const
EventChannel
*
,
uint64
,
const
int64
*
data
,
int
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
uint64
>(
const
EventChannel
*
,
uint64
,
const
uint64
*
data
,
int
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
float
>(
const
EventChannel
*
,
uint64
,
const
float
*
data
,
int
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
double
>(
const
EventChannel
*
,
uint64
,
const
double
*
data
,
int
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
int8
>(
const
EventChannel
*
,
uint64
,
const
int8
*
data
,
int
,
const
MetaDataValueArray
&
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
uint8
>(
const
EventChannel
*
,
uint64
,
const
uint8
*
data
,
int
,
const
MetaDataValueArray
&
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
int16
>(
const
EventChannel
*
,
uint64
,
const
int16
*
data
,
int
,
const
MetaDataValueArray
&
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
uint16
>(
const
EventChannel
*
,
uint64
,
const
uint16
*
data
,
int
,
const
MetaDataValueArray
&
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
int32
>(
const
EventChannel
*
,
uint64
,
const
int32
*
data
,
int
,
const
MetaDataValueArray
&
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
uint32
>(
const
EventChannel
*
,
uint64
,
const
uint32
*
data
,
int
,
const
MetaDataValueArray
&
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
int64
>(
const
EventChannel
*
,
uint64
,
const
int64
*
data
,
int
,
const
MetaDataValueArray
&
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
uint64
>(
const
EventChannel
*
,
uint64
,
const
uint64
*
data
,
int
,
const
MetaDataValueArray
&
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
float
>(
const
EventChannel
*
,
uint64
,
const
float
*
data
,
int
,
const
MetaDataValueArray
&
,
uint16
);
template
BinaryEvent
*
BinaryEvent
::
createBinaryEvent
<
double
>(
const
EventChannel
*
,
uint64
,
const
double
*
data
,
int
,
const
MetaDataValueArray
&
,
uint16
);
\ No newline at end of file
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