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
e8175c2a
Commit
e8175c2a
authored
8 years ago
by
Aaron Cuevas Lopez
Browse files
Options
Downloads
Patches
Plain Diff
Add machine descriptor field to metadata descriptor
parent
f2bc1a65
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/Processors/Channel/MetaData.cpp
+4
-3
4 additions, 3 deletions
Source/Processors/Channel/MetaData.cpp
Source/Processors/Channel/MetaData.h
+23
-5
23 additions, 5 deletions
Source/Processors/Channel/MetaData.h
with
27 additions
and
8 deletions
Source/Processors/Channel/MetaData.cpp
+
4
−
3
View file @
e8175c2a
...
...
@@ -44,8 +44,8 @@ bool checkMetaDataType(MetaDataDescriptor::MetaDataTypes baseType)
//MetaDataDescriptor
MetaDataDescriptor
::
MetaDataDescriptor
(
MetaDataDescriptor
::
MetaDataTypes
t
,
unsigned
int
length
,
String
n
,
String
d
)
:
m_
typ
e
(
t
),
m_
length
(
length
),
m_
nam
e
(
n
),
m_
desc
(
d
)
MetaDataDescriptor
::
MetaDataDescriptor
(
MetaDataDescriptor
::
MetaDataTypes
t
,
unsigned
int
length
,
String
n
,
String
d
,
String
dm
)
:
m_
nam
e
(
n
),
m_
description
(
d
),
m_descriptor
(
dm
),
m_
typ
e
(
t
),
m_
length
(
length
)
{};
MetaDataDescriptor
::~
MetaDataDescriptor
()
{};
...
...
@@ -54,7 +54,8 @@ MetaDataDescriptor::MetaDataTypes MetaDataDescriptor::getType() const { return m
unsigned
int
MetaDataDescriptor
::
getLength
()
const
{
return
m_length
;
}
size_t
MetaDataDescriptor
::
getDataSize
()
const
{
return
m_length
*
getTypeSize
(
m_type
);
}
String
MetaDataDescriptor
::
getName
()
const
{
return
m_name
;
}
String
MetaDataDescriptor
::
getDescription
()
const
{
return
m_desc
;
}
String
MetaDataDescriptor
::
getDescription
()
const
{
return
m_description
;
}
String
MetaDataDescriptor
::
getDescriptor
()
const
{
return
m_descriptor
;
}
bool
MetaDataDescriptor
::
isEqual
(
const
MetaDataDescriptor
&
other
)
const
{
...
...
This diff is collapsed.
Click to expand it.
Source/Processors/Channel/MetaData.h
+
23
−
5
View file @
e8175c2a
...
...
@@ -57,13 +57,30 @@ public:
DOUBLE
};
MetaDataDescriptor
(
MetaDataTypes
type
,
unsigned
int
length
,
String
name
,
String
desc
);
/**
MetaData descriptor constructor
@param type The primitive type this metadata field will hold
@param length The length of the data. 1 for single value or mroe for arrays.
@param name The human-readable name of this metadata field
@param humanDescription A human-readable description of what this field represents
@param machineDescriptor A simple machine-readable name for this metadata value
name and humanDescription will be saved in most data formats for latter reference
*/
MetaDataDescriptor
(
MetaDataTypes
type
,
unsigned
int
length
,
String
name
,
String
humanDescription
,
String
machineDescriptor
);
~
MetaDataDescriptor
();
/** Gets the primitive type of this field */
MetaDataTypes
getType
()
const
;
/** Gets the number of elements in this field */
unsigned
int
getLength
()
const
;
/** Gets the total data in bytes for this field */
size_t
getDataSize
()
const
;
/** Gets the human-readable name of this field */
String
getName
()
const
;
/** Gets the human-readable description of the field */
String
getDescription
()
const
;
/** Gets the machine-readable descriptor for this field */
String
getDescriptor
()
const
;
bool
isEqual
(
const
MetaDataDescriptor
&
other
)
const
;
bool
operator
==
(
const
MetaDataDescriptor
&
other
)
const
;
...
...
@@ -71,10 +88,11 @@ public:
static
size_t
getTypeSize
(
MetaDataTypes
type
);
private
:
MetaDataDescriptor
()
=
delete
;
String
m_name
;
String
m_desc
;
MetaDataTypes
m_type
;
unsigned
int
m_length
;
const
String
m_name
;
const
String
m_descriptor
;
const
String
m_description
;
const
MetaDataTypes
m_type
;
const
unsigned
int
m_length
;
JUCE_LEAK_DETECTOR
(
MetaDataDescriptor
);
};
...
...
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