Commit d75937f4 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Mergin conflict ready

parents 76e13fc5 97ef3d5f
...@@ -36,7 +36,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -36,7 +36,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
You should also have received a [copy of the License](LICENSE.md) with the VA software package. You should also have received acopy of the License with the VA software package.
@section getting_started Getting started @section getting_started Getting started
......
...@@ -57,13 +57,13 @@ public: ...@@ -57,13 +57,13 @@ public:
//! Type ID getter //! Type ID getter
/** /**
* @return Returns the ID (one out of #SoundSourceTypes) * @return Returns the ID (one out of AudioSignalSourceType)
*/ */
virtual int GetType() const = 0; virtual int GetType() const = 0;
//! Type getter (human readable string) //! Type getter (human readable string)
/** /**
* @return Returns the type (one out of #SoundSourceTypes as a human readable string) * @return Returns the type (one out of AudioSignalSourceType as a human readable string)
*/ */
virtual std::string GetTypeString() const = 0; virtual std::string GetTypeString() const = 0;
...@@ -101,19 +101,18 @@ public: ...@@ -101,19 +101,18 @@ public:
/** /**
* Returns the data pointer to the next audio block of the sound source. * Returns the data pointer to the next audio block of the sound source.
* *
* @param[in] oStreamState Information on stream state * @param[in] pStreamInfo Information on stream state
* *
* @return Pointer to the audio data array containing data for next block (NULL if no data available) * @return Pointer to the audio data array containing data for next block (NULL if no data available)
* *
* @note This method is called by the core to fetch data. If the core * @note This method is called by the core to fetch data. If the core receives a NULL pointer it will be interpreted as silence.
* receives a NULL pointer it will be interpreted as silence.
*/ */
virtual const float* GetStreamBlock( const CVAAudiostreamState* pStreamInfo ) = 0; virtual const float* GetStreamBlock( const CVAAudiostreamState* pStreamInfo ) = 0;
//! Parameter getter interaction hook //! Parameter getter interaction hook
/** /**
* @param[in] oIn Parameter request set * @param[in] oIn Parameter request set
* @param[out] Parameters * @return Parameters
*/ */
virtual CVAStruct GetParameters( const CVAStruct& oIn ) const = 0; virtual CVAStruct GetParameters( const CVAStruct& oIn ) const = 0;
......
...@@ -198,12 +198,12 @@ inline VABASE_API VAVec3 operator-( const VAVec3& oSummand1, const VAVec3& oSumm ...@@ -198,12 +198,12 @@ inline VABASE_API VAVec3 operator-( const VAVec3& oSummand1, const VAVec3& oSumm
//!< Scalar multiply operator for vectors //!< Scalar multiply operator for vectors
/** /**
* @param[in] oVec VEctor * @param[in] oVec Vector
* @param[in] dScalar Scalar * @param[in] dScalar Scalar
* *
* @param Scaled vector * @return Scaled vector
*/ */
inline VABASE_API VAVec3 operator*( const VAVec3& oVec, double dScalar ) inline VABASE_API VAVec3 operator*( const VAVec3& oVec, const double dScalar )
{ {
VAVec3 vScaledVector = oVec; VAVec3 vScaledVector = oVec;
vScaledVector.x *= dScalar; vScaledVector.x *= dScalar;
...@@ -535,16 +535,25 @@ public: ...@@ -535,16 +535,25 @@ public:
, iType( UNSPECIFIED ) , iType( UNSPECIFIED )
{}; {};
// Signal source destructor
virtual inline ~CVASignalSourceInfo() {}; virtual inline ~CVASignalSourceInfo() {};
//! Initializing constructor //! Initializing constructor
/** /**
* @param[in] sID Identifier string * @param[in] sID Identifier string
<<<<<<< HEAD
* @param[in] iType Signal source type * @param[in] iType Signal source type
* @param[in] sName Name of signal source info * @param[in] sName Name of signal source info
* @param[in] sDesc Brief description of signal source info * @param[in] sDesc Brief description of signal source info
* @param[in] sState State description of signal source info * @param[in] sState State description of signal source info
* @param[in] iReference Usage reference counter * @param[in] iReference Usage reference counter
=======
* @param[in] iType Type
* @param[in] sName Name of signal source info
* @param[in] sDesc Brief description of signal source info
* @param[in] sState State description of signal source info
* @param[in] iReferences Usage reference counter
>>>>>>> 97ef3d5f8f255a5f334144c02fd00c96b099f8bf
*/ */
inline CVASignalSourceInfo( const std::string& sID, const int iType, const std::string& sName, const std::string& sDesc, const std::string& sState, const int iReferences ) inline CVASignalSourceInfo( const std::string& sID, const int iType, const std::string& sName, const std::string& sDesc, const std::string& sState, const int iReferences )
: sID( sID ) : sID( sID )
...@@ -568,7 +577,6 @@ public: ...@@ -568,7 +577,6 @@ public:
std::string sID; //!< Scene identifier std::string sID; //!< Scene identifier
std::string sName; //!< Scene name std::string sName; //!< Scene name
bool bEnabled; //!< Enabled/disabled flag bool bEnabled; //!< Enabled/disabled flag
CVAStruct oParams; //!< Scene parameters CVAStruct oParams; //!< Scene parameters
//! Constructor settng scene info as enabled //! Constructor settng scene info as enabled
...@@ -577,7 +585,7 @@ public: ...@@ -577,7 +585,7 @@ public:
{ {
}; };
//! Destructor //! Scene info destructor
inline virtual ~CVASceneInfo() inline virtual ~CVASceneInfo()
{ {
}; };
...@@ -634,6 +642,7 @@ public: ...@@ -634,6 +642,7 @@ public:
CVAStruct oParams; //!< Special parameters CVAStruct oParams; //!< Special parameters
//! Constructor for sound source info
inline CVASoundSourceInfo() inline CVASoundSourceInfo()
: iID( -1 ) : iID( -1 )
, bMuted( false ) , bMuted( false )
...@@ -643,6 +652,7 @@ public: ...@@ -643,6 +652,7 @@ public:
, iAuraMode( -1 ) , iAuraMode( -1 )
{}; {};
//! Destructor
virtual inline ~CVASoundSourceInfo() {}; virtual inline ~CVASoundSourceInfo() {};
}; };
...@@ -675,6 +685,7 @@ public: ...@@ -675,6 +685,7 @@ public:
CVAStruct oParams; //!< Special parameters CVAStruct oParams; //!< Special parameters
//! Constructor for sound receiver info
inline CVASoundReceiverInfo() inline CVASoundReceiverInfo()
: iID( -1 ) : iID( -1 )
, iDirectivityID( -1 ) , iDirectivityID( -1 )
...@@ -683,6 +694,7 @@ public: ...@@ -683,6 +694,7 @@ public:
, bEnabled( true ) , bEnabled( true )
{}; {};
//! Destructor
virtual inline ~CVASoundReceiverInfo() {}; virtual inline ~CVASoundReceiverInfo() {};
}; };
...@@ -693,12 +705,12 @@ class VABASE_API CVASoundPortalInfo ...@@ -693,12 +705,12 @@ class VABASE_API CVASoundPortalInfo
public: public:
int iID; //!< ID int iID; //!< ID
std::string sName; //!< Displayed name (optional) std::string sName; //!< Displayed name (optional)
bool bEnabled; bool bEnabled; //!< Enabled flag
int iMaterialID; //!< Material ID with transmission data int iMaterialID; //!< Material ID with transmission data
int iNextPortalID; int iNextPortalID; //!< Next sound portal identifier, if existing
int iSoundReceiverID; int iSoundReceiverID; //!< Source receiver identifier, if existing
int iSoundSourceID; int iSoundSourceID; //!< Source sound identifier, if existing
VAVec3 v3Pos; //!< Position vector [m] VAVec3 v3Pos; //!< Position vector [m]
VAVec3 v3View, v3Up; //!< View-/Up-vector VAVec3 v3View, v3Up; //!< View-/Up-vector
...@@ -706,6 +718,7 @@ public: ...@@ -706,6 +718,7 @@ public:
CVAStruct oParams; //!< Special parameters CVAStruct oParams; //!< Special parameters
//! Default constructor for sound portal
inline CVASoundPortalInfo() inline CVASoundPortalInfo()
: iID( -1 ) : iID( -1 )
, iNextPortalID( -1 ) , iNextPortalID( -1 )
...@@ -714,6 +727,7 @@ public: ...@@ -714,6 +727,7 @@ public:
, iMaterialID( -1 ) , iMaterialID( -1 )
{}; {};
//! Destructor
virtual inline ~CVASoundPortalInfo() {}; virtual inline ~CVASoundPortalInfo() {};
}; };
...@@ -748,6 +762,9 @@ public: ...@@ -748,6 +762,9 @@ public:
inline CVAAcousticMaterial() inline CVAAcousticMaterial()
: iID( -1 ) : iID( -1 )
{}; {};
//! Destructor
virtual inline ~CVAAcousticMaterial() {};
}; };
...@@ -763,29 +780,36 @@ public: ...@@ -763,29 +780,36 @@ public:
class VABASE_API CVAGeometryMesh class VABASE_API CVAGeometryMesh
{ {
public: public:
//! Vertex representation
class CVAVertex class CVAVertex
{ {
public: public:
int iID; int iID; //!< Vertex identifier
VAVec3 v3Point; VAVec3 v3Point; //!< Vertext point / position
//! Constructor initializing defaults
inline CVAVertex() : iID( -1 ) {}; inline CVAVertex() : iID( -1 ) {};
}; };
//! Face representation
class CVAFace class CVAFace
{ {
public: public:
int iID; int iID; //!< Face identifier
int iMaterialID; //!< Assigned material int iMaterialID; //!< Assigned material
std::vector< int > viVertexList; std::vector< int > viVertexList; //!< Face vertices
//! Constructor initializing defaults
inline CVAFace() : iID( -1 ), iMaterialID( -1 ) {}; inline CVAFace() : iID( -1 ), iMaterialID( -1 ) {};
}; };
int iID; int iID; //!< Geometry mesh identifier
bool bEnabled; bool bEnabled; //!< Enabled flag
std::vector< CVAVertex > voVertices; //!< List of available vertices std::vector< CVAVertex > voVertices; //!< List of available vertices
std::vector< CVAFace > voFaces; //!< List of faces defined by vertices std::vector< CVAFace > voFaces; //!< List of faces defined by vertices
CVAStruct oParams; //!< Additional parameters CVAStruct oParams; //!< Additional parameters
//! Constructor initializing members
inline CVAGeometryMesh() inline CVAGeometryMesh()
: iID( -1 ) : iID( -1 )
, bEnabled( true ) , bEnabled( true )
......
...@@ -18,25 +18,31 @@ ...@@ -18,25 +18,31 @@
//! Global synchronization token for event handler operations //! Global synchronization token for event handler operations
/** /**
* This singleton class realizes a global synchronization token * This singleton class realizes a global synchronization token
* that can be used to realize mutual exclusive operations regarding * that can be used to realize mutual exclusive operations regarding
* event handlers, like attaching/detaching event handlers to * event handlers, like attaching/detaching event handlers to
* event handler registrys and destruction of event handlers. * event handler registrys and destruction of event handlers.
*/ */
class VABASE_API IVAEventHandlerGlobalLock class VABASE_API IVAEventHandlerGlobalLock
{ {
public: public:
//! Returns the singleton instance //! Returns the singleton instance
/**
* @return Global lock for event handling
*/
static IVAEventHandlerGlobalLock& GetInstance(); static IVAEventHandlerGlobalLock& GetInstance();
// Lock (blocking wait, no try) //! Lock (blocking wait, no try)
virtual void Lock() const = 0; virtual void Lock() const = 0;
// Unlock //! Unlock
virtual void Unlock() const = 0; virtual void Unlock() const = 0;
protected: protected:
//! Protected default constructor
inline IVAEventHandlerGlobalLock() {}; inline IVAEventHandlerGlobalLock() {};
//! Protected destructor
virtual inline ~IVAEventHandlerGlobalLock() {}; virtual inline ~IVAEventHandlerGlobalLock() {};
}; };
......
...@@ -20,10 +20,9 @@ ...@@ -20,10 +20,9 @@
//! Base class for exceptions //! Base class for exceptions
/** /**
* This is the exception base class for all VA software components. * This is the exception base class for all VA software components.
* Exceptions are defined by an error code and an error message. * Exceptions are defined by an error code and an error message.
*/ */
class VABASE_API CVAException class VABASE_API CVAException
{ {
public: public:
...@@ -45,23 +44,36 @@ public: ...@@ -45,23 +44,36 @@ public:
CVAException(); CVAException();
//! Initialization constructor //! Initialization constructor
CVAException( int iErrorCode, const std::string& sErrorMessage = "" ); /**
* @param[in] iErrorCode Error code
* @param[in] sErrorMessage Error text
*/
CVAException( const int iErrorCode, const std::string& sErrorMessage = "" );
//! Destructor //! Destructor
virtual ~CVAException(); virtual ~CVAException();
//! Returns the error code //! Returns the error code
/**
* @return Error code, one of ErrorCode
*/
int GetErrorCode() const; int GetErrorCode() const;
//! Returns the error message //! Returns the error message
/**
* @return Error text message
*/
std::string GetErrorMessage() const; std::string GetErrorMessage() const;
//! Return a string representation of the exception //! Return a string representation of the exception
/**
* @return Formatted text of exception
*/
std::string ToString() const; std::string ToString() const;
protected: protected:
int m_iErrorCode; int m_iErrorCode; //!< Error code, one of ErrorCode
std::string m_sErrorMessage; std::string m_sErrorMessage; //!< Error text message
}; };
//! Macro for throwing exceptions //! Macro for throwing exceptions
...@@ -71,6 +83,11 @@ protected: ...@@ -71,6 +83,11 @@ protected:
#define VA_EXCEPT_NOT_IMPLEMENTED { throw CVAException( (CVAException::NOT_IMPLEMENTED) , "Not implemented" ); } #define VA_EXCEPT_NOT_IMPLEMENTED { throw CVAException( (CVAException::NOT_IMPLEMENTED) , "Not implemented" ); }
//! STL stream output operator //! STL stream output operator
/**
* @param[in] os Outstream object
* @param[in] ex VA exception
* @return Outstream object including exception text
*/
VABASE_API std::ostream& operator<<( std::ostream& os, const CVAException& ex ); VABASE_API std::ostream& operator<<( std::ostream& os, const CVAException& ex );
#endif // IW_VABASE_EXCEPTION #endif // IW_VABASE_EXCEPTION
This diff is collapsed.
...@@ -29,38 +29,64 @@ public: ...@@ -29,38 +29,64 @@ public:
//! Default constructor //! Default constructor
CVAObject(); CVAObject();
//! Initialization constructors //! Initialization constructor
/**
* @param[in] pszName Character type name initialization
*/
CVAObject( const char* pszName ); CVAObject( const char* pszName );
//! Initialization constructor
/**
* @param[in] sName String type name initialization
*/
CVAObject( const std::string& sName ); CVAObject( const std::string& sName );
//! Destructor //! Destructor
virtual ~CVAObject(); virtual ~CVAObject();
//! Returns the ID of the object //! Returns the ID of the object
/**
* @return Object identifier integer
*/
int GetObjectID() const; int GetObjectID() const;
//! Returns the name of the object //! Returns the name of the object
/**
* @return Object name
*/
std::string GetObjectName() const; std::string GetObjectName() const;
//! Returns information on the object //! Returns information on the object
/**
* @return Object info
*/
virtual CVAObjectInfo GetObjectInfo() const; virtual CVAObjectInfo GetObjectInfo() const;
//! Call the object with a message and capture return message //! Call the object with a message and capture return message
/** /**
* * @param[in] oArgs Object call arguments as CVAStruct
* @return Object call return value as CVAStruct
*/ */
virtual CVAStruct CallObject( const CVAStruct& oArgs ) = 0; virtual CVAStruct CallObject( const CVAStruct& oArgs ) = 0;
protected: protected:
// Important: An object may not change its name after it is registered // Important: An object may not change its name after it is registered
/**
* @param[in] sName Name of new object
* @note This may only be called from an object registry
*/
void SetObjectName( const std::string& sName ); void SetObjectName( const std::string& sName );
private: private:
int m_iObjectID; int m_iObjectID; //!< Object identifier
std::string m_sObjectName; std::string m_sObjectName; //!< Object name (should not be changed during runtime)
// Note: This may only be called from an object registry //! Object identifier (integer) setter
void SetObjectID( const int iID ); /**
* @param[in] iID Object identifier number
* @note This may only be called from an object registry
*/
void SetObjectID( const int iID );
friend class CVAObjectRegistry; friend class CVAObjectRegistry;
}; };
......
...@@ -22,12 +22,13 @@ ...@@ -22,12 +22,13 @@
#include <string> #include <string>
#include <vector> #include <vector>
// Forwards
class CVAObject; class CVAObject;
//! Registry class for objects //! Registry class for objects
/** /**
* * Handles VA object registration. Objects will be callable via object / module interface.
*/ */
class VABASE_API CVAObjectRegistry class VABASE_API CVAObjectRegistry
{ {
public: public:
...@@ -37,66 +38,84 @@ public: ...@@ -37,66 +38,84 @@ public:
//! Destructor //! Destructor
~CVAObjectRegistry(); ~CVAObjectRegistry();
//! Clear up. Deregisters all modules. //! Clear objects. Deregisters all modules.
void Clear(); void Clear();
//! Registers an object with the registry and returns its ID //! Registers an object with the registry and returns its ID
/**
* @param[in] pObject Object pointer
* @return Object identifier
*/
int RegisterObject( CVAObject* pObject ); int RegisterObject( CVAObject* pObject );
//! Deregisters an object from the registry //! Deregisters an object from the registry
/**
* @param[in] pObject Object pointer
*/
void UnregisterObject( CVAObject* pObject ); void UnregisterObject( CVAObject* pObject );
//! Query the IDs of all objects //! Query the IDs of all objects
void GetObjectIDs( std::vector< int >& viIDs ) const; void GetObjectIDs( std::vector< int >& viIDs ) const;
//! Query information on all objects //! Query information on all objects
/**
* @param[in] viInfos Object infos
*/
void GetObjectInfos( std::vector< CVAObjectInfo >& viInfos ) const; void GetObjectInfos( std::vector< CVAObjectInfo >& viInfos ) const;
//! Finds an object by its ID //! Finds an object by its ID
/**