Conscience Core
Classes | Namespaces | Macros | Functions
CommandExecutionResult.h File Reference
#include "CscCommon.h"
#include "../CommandParamsSpec.h"

Go to the source code of this file.

Classes

class  conscience_core::bridging::commands::result::CscCommandExecutionResult
 
class  conscience_core::bridging::commands::result::CscCommandExecutionResultDouble
 
class  conscience_core::bridging::commands::result::CscCommandExecutionResultObject< TResult >
 
class  conscience_core::bridging::commands::result::CscCommandExecutionResultList< TResult >
 
class  conscience_core::bridging::commands::result::CscCommandExecutionResultBool
 
class  conscience_core::bridging::commands::result::CscCommandExecutionResultLong
 
class  conscience_core::bridging::commands::result::CscCommandExecutionResultUnsignedLong
 

Namespaces

 conscience_core
 
 conscience_core::bridging
 
 conscience_core::bridging::commands
 
 conscience_core::bridging::commands::result
 

Macros

#define COMMAND_RESULT_JSON_SERIALIZER(TClass, ...)
 

Functions

 conscience_core::bridging::commands::result::ENUM (CscCommandResultType, RESULT_NONE, RESULT_SEQUENCE, RESULT_POSITIONS, RESULT_FILE, RESULT_STRING, RESULT_BINARY, RESULT_OBJECT, RESULT_LIST, RESULT_BOOL, RESULT_LONG, RESULT_UNSIGNEDLONG, RESULT_DOUBLEFLOAT)
 
string conscience_core::bridging::commands::result::commandResultTypeToString (CscCommandResultType type)
 

Macro Definition Documentation

◆ COMMAND_RESULT_JSON_SERIALIZER

#define COMMAND_RESULT_JSON_SERIALIZER (   TClass,
  ... 
)
Value:
namespace { \
bool __registerCommandResultJsonSerializer_##TClass = registerCommandDataJsonSerializer(typeid(TClass), [](const any &objectAny) { \
auto logger = CscLogger::getForCategory(#TClass "JsonSerializerFunc"); \
const TClass *object = anyToPointer<TClass>(objectAny); \
optional<JsonSerializableData> result = {}; \
if (object != nullptr) { \
map<string, JsonSerializableData> jsonMap; \
FOR_EACH(FIELDS_ASSIGN_INTO_JSONMAP_PRINT_NOTYPE, __VA_ARGS__) \
result = jsonMap; \
} \
return result; \
}); \
}
FIELDS_ASSIGN_INTO_JSONMAP_PRINT_NOTYPE
#define FIELDS_ASSIGN_INTO_JSONMAP_PRINT_NOTYPE(FIELD_name)
Definition: CommandParamsSpec.h:632
logger
static std::unique_ptr< CscLogger > logger
Definition: gltfHelpers.cpp:6
conscience_core::bridging::commands::registerCommandDataJsonSerializer
bool registerCommandDataJsonSerializer(const type_info &typeInfo, function< optional< JsonSerializableData >(const any &object)> serializer)
Definition: CommandParamsSpec.h:387