Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
VABase
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Security & Compliance
Security & Compliance
Dependency List
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
VABase
Commits
44d84fb6
Commit
44d84fb6
authored
Aug 25, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding VAStruct char* bracket operator support for direct access with text fields, and style
parent
946545dc
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
145 additions
and
187 deletions
+145
-187
include/VAStruct.h
include/VAStruct.h
+7
-4
src/VABaseDefinitions.cpp
src/VABaseDefinitions.cpp
+5
-25
src/VACoreEvent.cpp
src/VACoreEvent.cpp
+0
-22
src/VACoreVersion.cpp
src/VACoreVersion.cpp
+2
-1
src/VAEventHandlerGlobalLock.cpp
src/VAEventHandlerGlobalLock.cpp
+16
-28
src/VAStruct.cpp
src/VAStruct.cpp
+115
-107
No files found.
include/VAStruct.h
View file @
44d84fb6
...
...
@@ -116,10 +116,12 @@ public:
CVAStructValue
*
GetValue
(
const
std
::
string
&
sPath
,
char
cPathSeparator
=
DEFAULT_PATH_SEPARATOR
);
//! Read-only data access
const
CVAStructValue
&
operator
[](
const
std
::
string
&
sKey
)
const
;
const
CVAStructValue
&
operator
[](
const
char
*
pcKey
)
const
;
inline
const
CVAStructValue
&
operator
[](
const
std
::
string
&
sKey
)
const
{
return
(
*
this
)[
sKey
.
c_str
()];
};
//! Read/write data access
CVAStructValue
&
operator
[](
const
std
::
string
&
sKey
);
CVAStructValue
&
operator
[](
const
char
*
pcKey
);
inline
CVAStructValue
&
operator
[](
const
std
::
string
&
sKey
)
{
return
(
*
this
)[
sKey
.
c_str
()];
};
//! Assignment
CVAStruct
&
operator
=
(
const
CVAStruct
&
rhs
);
...
...
@@ -224,11 +226,12 @@ public:
//! Read-only data access
// Note: Is applicable only for struct keys
const
CVAStructValue
&
operator
[](
const
std
::
string
&
s
Key
)
const
;
const
CVAStructValue
&
operator
[](
const
char
*
pc
Key
)
const
;
//! Read/write data access
// Note: Is applicable only for struct keys
CVAStructValue
&
operator
[](
const
std
::
string
&
sKey
);
CVAStructValue
&
operator
[](
const
char
*
pcKey
);
inline
CVAStructValue
&
operator
[](
const
std
::
string
&
sKey
)
{
return
(
*
this
)[
sKey
.
c_str
()];
};
//! Cast to bool operator (required for assignments of the form 'bool = CVAStructKey')
operator
bool
()
const
;
...
...
src/VABaseDefinitions.cpp
View file @
44d84fb6
/*
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University (http://www.akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
*
* File: VABaseDefinitions.cpp
*
* Purspose: Global definitions and declarations
*
* Author(s): Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
*/
// $Id: $
#include <VABaseDefinitions.h>
#include <iostream>
#include <iomanip>
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
VAVec3
&
oVec
)
{
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
VAVec3
&
oVec
)
{
return
os
<<
std
::
fixed
<<
std
::
setprecision
(
3
)
<<
"< "
<<
oVec
.
x
<<
", "
<<
oVec
.
y
<<
", "
<<
oVec
.
z
<<
" >"
;
<<
"< "
<<
oVec
.
x
<<
", "
<<
oVec
.
y
<<
", "
<<
oVec
.
z
<<
" >"
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
VAOrientYPR
&
oOrient
)
{
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
VAOrientYPR
&
oOrient
)
{
return
os
<<
std
::
fixed
<<
std
::
setprecision
(
2
)
<<
"< "
<<
oOrient
.
yaw
<<
", "
<<
oOrient
.
pitch
<<
", "
<<
oOrient
.
roll
<<
" >"
;
}
src/VACoreEvent.cpp
View file @
44d84fb6
/*
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institut fr Technische Akustik (ITA)
* VVVV AAA RWTH Aachen (http://www.akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
*
* Datei: VACoreEvent.cpp
*
* Zweck: Basisklasse fr Kern-Nachrichten
*
* Autor(en): Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
*/
// $Id: VACoreEvent.cpp 4147 2015-08-03 15:45:06Z fwefers $
#include <VACoreEvent.h>
#include <VACore.h>
...
...
src/VACoreVersion.cpp
View file @
44d84fb6
...
...
@@ -2,7 +2,8 @@
#include <sstream>
std
::
string
CVACoreVersionInfo
::
ToString
()
const
{
std
::
string
CVACoreVersionInfo
::
ToString
()
const
{
// Ausgabeformat: "VACore 1.24 [FLAGS] (COMMENT)"
std
::
stringstream
ss
;
ss
<<
"VACore "
<<
sVersion
;
...
...
src/VAEventHandlerGlobalLock.cpp
View file @
44d84fb6
/*
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institut fr Technische Akustik (ITA)
* VVVV AAA RWTH Aachen (http://www.akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
*
* Datei: VAEventHandlerGlobalLock.cpp
*
* Zweck: Global synchronization token for event handler operations
*
* Autor(en): Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de
*
* ---------------------------------------------------------------------------------
*/
// $Id: VABaseDefinitions.h 1717 2011-04-04 21:01:04Z fwefers $
#include <VAEventHandlerGlobalLock.h>
// @todo: remove dependency and replace by c++11 std::mutex
#include <VistaInterProcComm/Concurrency/VistaMutex.h>
// Implementation class
class
CVAEventHandlerGlobalLockImpl
:
public
IVAEventHandlerGlobalLock
{
class
CVAEventHandlerGlobalLockImpl
:
public
IVAEventHandlerGlobalLock
{
public:
mutable
VistaMutex
m_oLock
;
void
Lock
()
const
{
m_oLock
.
Lock
();
}
void
Unlock
()
const
{
m_oLock
.
Unlock
();
}
inline
void
Lock
()
const
{
m_oLock
.
Lock
();
};
inline
void
Unlock
()
const
{
m_oLock
.
Unlock
();
};
CVAEventHandlerGlobalLockImpl
()
{};
~
CVAEventHandlerGlobalLockImpl
()
{};
inline
CVAEventHandlerGlobalLockImpl
()
{};
inline
~
CVAEventHandlerGlobalLockImpl
()
{};
};
// Singleton instance
CVAEventHandlerGlobalLockImpl
g_oEventHandlerGlobalLock
;
IVAEventHandlerGlobalLock
&
IVAEventHandlerGlobalLock
::
GetInstance
()
{
IVAEventHandlerGlobalLock
&
IVAEventHandlerGlobalLock
::
GetInstance
()
{
return
g_oEventHandlerGlobalLock
;
}
src/VAStruct.cpp
View file @
44d84fb6
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment