mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-16 10:31:05 -05:00
Feature/documentation topic (#822)
- Implement documentation topic that can be used to query documentation using the network API. - Implement a way to pass arguments to lua scripts using json (rather than formatting entire lua string clientside) - Implement ability to attach callback to lua script executions - Implement abillity to transport return values from lua scripts back to network API clients. - Do not initialize server interface on slave nodes. - Implement Dictionary -> json converter using nlohmann json library
This commit is contained in:
@@ -36,7 +36,7 @@ SyncEngine::SyncEngine(unsigned int syncBufferSize)
|
||||
ghoul_assert(syncBufferSize > 0, "syncBufferSize must be bigger than 0");
|
||||
}
|
||||
|
||||
// should be called on sgct master
|
||||
// Should be called on sgct master
|
||||
std::vector<char> SyncEngine::encodeSyncables() {
|
||||
for (Syncable* syncable : _syncables) {
|
||||
syncable->encode(&_syncBuffer);
|
||||
@@ -45,17 +45,9 @@ std::vector<char> SyncEngine::encodeSyncables() {
|
||||
std::vector<char> data = _syncBuffer.data();
|
||||
_syncBuffer.reset();
|
||||
return data;
|
||||
|
||||
//_dataStream.resize(_encodeOffset);
|
||||
//_synchronizationBuffer->setVal(_dataStream);
|
||||
//sgct::SharedData::instance()->writeVector(_synchronizationBuffer.get());
|
||||
//_dataStream.resize(_n);
|
||||
//_encodeOffset = 0;
|
||||
//_decodeOffset = 0;
|
||||
//_syncBuffer.write();
|
||||
}
|
||||
|
||||
//should be called on sgct slaves
|
||||
// Should be called on sgct slaves
|
||||
void SyncEngine::decodeSyncables(std::vector<char> data) {
|
||||
_syncBuffer.setData(std::move(data));
|
||||
for (Syncable* syncable : _syncables) {
|
||||
@@ -78,14 +70,14 @@ void SyncEngine::postSynchronization(IsMaster isMaster) {
|
||||
}
|
||||
|
||||
void SyncEngine::addSyncable(Syncable* syncable) {
|
||||
ghoul_assert(syncable, "synable must not be nullptr");
|
||||
ghoul_assert(syncable, "Syncable must not be nullptr");
|
||||
|
||||
_syncables.push_back(syncable);
|
||||
}
|
||||
|
||||
void SyncEngine::addSyncables(const std::vector<Syncable*>& syncables) {
|
||||
for (Syncable* syncable : syncables) {
|
||||
ghoul_assert(syncable, "syncables must not contain any nullptr");
|
||||
ghoul_assert(syncable, "Syncables must not contain any nullptr");
|
||||
addSyncable(syncable);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user