Skip to content
Snippets Groups Projects
Commit 934b7cf2 authored by florian's avatar florian
Browse files

ENH: Add missing imlementations of message code and description

parent 5135df76
No related branches found
No related tags found
2 merge requests!12F consolidation,!8ENH: Add retrieval and queries to Extern C interface
Pipeline #11892 failed
This commit is part of merge request !8. Comments created here will be created in the context of that merge request.
...@@ -747,6 +747,27 @@ CAOSDB_PROPERTY_GET(datatype, ...@@ -747,6 +747,27 @@ CAOSDB_PROPERTY_GET(datatype,
CAOSDB_PROPERTY_GET(unit, strcpy(out, wrapped_property->GetUnit().c_str());) CAOSDB_PROPERTY_GET(unit, strcpy(out, wrapped_property->GetUnit().c_str());)
CAOSDB_PROPERTY_GET(value, strcpy(out, wrapped_property->GetValue().c_str());) CAOSDB_PROPERTY_GET(value, strcpy(out, wrapped_property->GetValue().c_str());)
ERROR_RETURN_CODE(
GENERIC_ERROR,
int caosdb_entity_message_get_code(caosdb_entity_message *message, int *out),
{
auto *wrapped_message =
static_cast<caosdb::entity::Message *>(message->wrapped_message);
*out = wrapped_message->GetCode();
return 0;
})
ERROR_RETURN_CODE(
GENERIC_ERROR,
int caosdb_entity_message_get_description(caosdb_entity_message *message,
char *out),
{
auto *wrapped_message =
static_cast<caosdb::entity::Message *>(message->wrapped_message);
strcpy(out, wrapped_message->GetDescription().c_str());
return 0;
})
CAOSDB_ENTITY_SET(role, role, wrapped_entity->SetRole(std::string(role));) CAOSDB_ENTITY_SET(role, role, wrapped_entity->SetRole(std::string(role));)
CAOSDB_ENTITY_SET(name, name, wrapped_entity->SetName(std::string(name));) CAOSDB_ENTITY_SET(name, name, wrapped_entity->SetName(std::string(name));)
CAOSDB_ENTITY_SET(description, description, CAOSDB_ENTITY_SET(description, description,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment