Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VACore
Commits
34730c66
Commit
34730c66
authored
Feb 02, 2017
by
Jonas Stienen
Browse files
More Linux compat and style
parent
00aca828
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Reproduction/VAAudioReproductionModuleRegistry.h
View file @
34730c66
/*
* ---------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics
...
...
@@ -9,17 +10,8 @@
*
* ---------------------------------------------------------------------------------
*
* Datei: VAAudioReproductionModuleRegistry.h
*
* Zweck: Zentrale Registrierung von Reproduktionsmodulen
*
* Autor(en): Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
*/
// $Id: VAAudioReproductionModuleRegistry.h 3802 2014-11-25 21:13:27Z fwefers $
#ifndef __VA_AUDIOREPRODUCTIONMODULEREGISTRY_H__
#define __VA_AUDIOREPRODUCTIONMODULEREGISTRY_H__
...
...
@@ -41,6 +33,30 @@ public:
virtual
IVAAudioReproductionModule
*
Create
(
const
CVAAudioReproductionModuleInitParams
&
oParams
)
=
0
;
};
//! Default factory (template)
template
<
class
TReproduction
>
class
CVAAudioReproductionModuleDefaultFactory
:
public
IVAAudioReproductionModuleFactory
{
public:
inline
CVAAudioReproductionModuleDefaultFactory
(
const
std
::
string
&
sClassIdentifier
)
:
m_sClassIdentifier
(
sClassIdentifier
)
{
};
inline
std
::
string
GetClassIdentifier
()
const
{
return
this
->
m_sClassIdentifier
;
};
inline
IVAAudioReproductionModule
*
Create
(
const
CVAAudioReproductionModuleInitParams
&
oParams
)
{
return
new
TReproduction
(
oParams
);
};
private:
std
::
string
m_sClassIdentifier
;
};
//! Module registry (singleton)
class
CVAAudioReproductionModuleRegistry
{
...
...
@@ -74,28 +90,5 @@ private:
bool
m_bInternalCoreFactoriesRegistered
;
};
//! Default factory (template)
template
<
class
TReproduction
>
class
CVAAudioReproductionModuleDefaultFactory
:
public
IVAAudioReproductionModuleFactory
{
public:
inline
CVAAudioReproductionModuleDefaultFactory
(
const
std
::
string
&
sClassIdentifier
)
:
m_sClassIdentifier
(
sClassIdentifier
)
{
};
inline
std
::
string
GetClassIdentifier
()
const
{
return
this
->
m_sClassIdentifier
;
};
inline
IVAAudioReproductionModule
*
Create
(
const
CVAAudioReproductionModuleInitParams
&
oParams
)
{
return
new
TReproduction
(
oParams
);
};
private:
std
::
string
m_sClassIdentifier
;
};
#endif // __VA_AUDIOREPRODUCTIONMODULEREGISTRY_H__
src/VAObjectContainer.h
View file @
34730c66
...
...
@@ -86,7 +86,7 @@ public:
if
(
it
==
m_mObject2ID
.
end
()
)
return
;
int
iID
=
it
->
second
;
m_mID2Object
s
.
erase
(
iID
);
m_mID2Object
.
erase
(
iID
);
m_mObject2ID
.
erase
(
pObject
);
m_mID2Ref
.
erase
(
iID
);
};
...
...
@@ -213,7 +213,7 @@ private:
int
m_iStartID
,
m_iIDCount
,
m_iIDLast
;
std
::
map
<
int
,
T
*
>
m_mID2Object
;
// Assoziationen ID -> Objekt
std
::
map
<
T
*
,
int
>
m_mObject2ID
;
// Assoziationen Objekt -> ID
std
::
map
<
int
,
int
>
m_mID2Ref
;
// Referenzzhler
std
::
map
<
int
,
int
>
m_mID2Ref
;
// Referenzzhler
};
#endif // __VA_OBJECTCONTAINER_H__
Write
Preview
Supports
Markdown
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