Clean include guards in OpenSpace core

Remove unused files
This commit is contained in:
Alexander Bock
2016-12-09 13:54:22 +01:00
parent df543f0ec3
commit d139dd2d22
152 changed files with 681 additions and 1681 deletions

View File

@@ -22,8 +22,8 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __SYNC_DATA_H__
#define __SYNC_DATA_H__
#ifndef __OPENSPACE_CORE___SYNCDATA___H__
#define __OPENSPACE_CORE___SYNCDATA___H__
#include <memory>
#include <mutex>
@@ -31,15 +31,13 @@
#include <ghoul/misc/assert.h>
#include <openspace/util/syncbuffer.h>
namespace openspace {
/**
* Interface for synchronizable data
*
* Used by <code>SyncEngine</code>
*/
* Interface for synchronizable data
*
* Used by <code>SyncEngine</code>
*/
class Syncable {
public:
virtual ~Syncable() {};
@@ -55,17 +53,17 @@ protected:
};
/**
* A double buffered implementation of the Syncable interface.
* Users are encouraged to used this class as a default way to synchronize different
* C++ data types using the <code>SyncEngine</code>
*
* This class aims to handle the synchronization parts and yet act like a regular
* instance of T. Implicit casts are supported, however, when accessing member functions or
* or variables, user may have to do explicit casts.
*
* ((T&) t).method();
*
*/
* A double buffered implementation of the Syncable interface.
* Users are encouraged to used this class as a default way to synchronize different
* C++ data types using the <code>SyncEngine</code>
*
* This class aims to handle the synchronization parts and yet act like a regular
* instance of T. Implicit casts are supported, however, when accessing member functions or
* or variables, user may have to do explicit casts.
*
* ((T&) t).method();
*
*/
template<class T>
class SyncData : public Syncable {
public:
@@ -77,29 +75,28 @@ public:
};
/**
* Allowing assignment of data as if
*/
* Allowing assignment of data as if
*/
SyncData& operator=(const T& rhs) {
data = rhs;
return *this;
}
/**
* Allow implicit cast to referenced T
*/
* Allow implicit cast to referenced T
*/
operator T&() {
return data;
}
/**
* Allow implicit cast to const referenced T
*/
* Allow implicit cast to const referenced T
*/
operator const T&() const {
return data;
}
protected:
virtual void encode(SyncBuffer* syncBuffer) {
_mutex.lock();
syncBuffer->encode(data);
@@ -121,14 +118,12 @@ protected:
}
};
T data;
T doubleBufferedData;
std::mutex _mutex;
};
} // namespace openspace
#endif //#ifndef __SYNC_DATA_H__
#endif // __OPENSPACE_CORE___SYNCDATA___H__