Workspace 7.0.2
Classes | Namespaces | Macros
protobuftypes.h File Reference
#include "Workspace/DataExecution/DataObjects/simpleadaptor.h"
#include "Workspace/DataExecution/DataObjects/typeddatafactory.h"
#include "Workspace/DataExecution/DataObjects/typedobject.h"
#include "Workspace/DataExecution/DataObjects/datafactorytraits.h"
#include "Workspace/DataExecution/DataObjects/derivedtobaseadaptor.h"
#include "protobufplugin_api.h"
Include dependency graph for protobuftypes.h:
This graph shows which files directly or indirectly include this file:

Classes

class  ProtobufAdaptors< T, false, false >
 
class  ProtobufAdaptors< T, true, false >
 
class  ProtobufAdaptors< T, true, true >
 
class  ProtobufAdaptorsBase
 

Namespaces

namespace  CSIRO
 Top level namespace for all Workspace code.
 
namespace  CSIRO::Protobuf
 
namespace  google
 
namespace  google::protobuf
 

Macros

#define DECLARE_WORKSPACE_JUST_PROTOBUF_TYPE(NameSpace, Type, API)
 
#define DECLARE_WORKSPACE_PROTOBUF_TYPE(NameSpace, Type, API)
 
#define DEFINE_WORKSPACE_JUST_PROTOBUF_TYPE(NameSpace, Type, PluginInstance, adaptorToProtobuf, adaptorFromProtobuf)
 
#define DEFINE_WORKSPACE_PROTOBUF_TYPE(NameSpace, Type, PluginInstance, adaptorToProtobuf, adaptorFromProtobuf)
 

Macro Definition Documentation

◆ DECLARE_WORKSPACE_JUST_PROTOBUF_TYPE

#define DECLARE_WORKSPACE_JUST_PROTOBUF_TYPE (   NameSpace,
  Type,
  API 
)
Value:
DECLARE_WORKSPACE_DATA_FACTORY(NameSpace::Type, API) \
DECLARE_WORKSPACE_SIMPLEADAPTOR(QByteArray, NameSpace::Type, API) \
DECLARE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Type, QByteArray, API) \
DECLARE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Type, QString, API)
#define DECLARE_WORKSPACE_DATA_FACTORY(T, WORKSPACE_EXPORT_SYMBOL)
Definition: datafactorytraits.h:782

Declare the Protobuf-generated Type in the Namespace and additional types designed for convenient access. If there is no equivalent Workspace type declared, or if there is a relevant Workspace type but no adaptor exists between the Protobuf generated type and the Workspace equivalent type, this macro handles the declaration.

◆ DECLARE_WORKSPACE_PROTOBUF_TYPE

#define DECLARE_WORKSPACE_PROTOBUF_TYPE (   NameSpace,
  Type,
  API 
)
Value:
DECLARE_WORKSPACE_DATA_FACTORY(NameSpace::Protobuf::Type, API) \
DECLARE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Type, NameSpace::Protobuf::Type, API) \
DECLARE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Protobuf::Type, NameSpace::Type, API) \
DECLARE_WORKSPACE_SIMPLEADAPTOR(QByteArray, NameSpace::Protobuf::Type, API) \
DECLARE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Protobuf::Type, QByteArray, API) \
DECLARE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Protobuf::Type, QString, API)

Declare the Protobuf-generated Type within the NameSpace, along with adaptors connecting the generated type to the Workspace type and any additional types designed for convenient access.

This macro assumes that the Protobuf generated type is located in the NameSpace::Protobuf namespace, which is under the same namespace as the Type. Additionally, it is assumed that the Protobuf generated type has the same class name as Type.

For example, if Type is in the MyApp::Data namespace and is named DataItem, the Protobuf generated type should be in the MyApp::Data::Protobuf namespace and should also be named DataItem.

Note that Namespace::Type should have been previously declared as a Workspace type elsewhere.

◆ DEFINE_WORKSPACE_JUST_PROTOBUF_TYPE

#define DEFINE_WORKSPACE_JUST_PROTOBUF_TYPE (   NameSpace,
  Type,
  PluginInstance,
  adaptorToProtobuf,
  adaptorFromProtobuf 
)
Value:
DEFINE_WORKSPACE_DATA_FACTORY(NameSpace::Type, PluginInstance); \
DEFINE_WORKSPACE_SIMPLEADAPTOR(QByteArray, NameSpace::Type, PluginInstance, CSIRO::Protobuf::ProtobufAdaptors<NameSpace::Type>::adaptFromQByteArray); \
DEFINE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Type, QByteArray, PluginInstance, CSIRO::Protobuf::ProtobufAdaptors<NameSpace::Type>::adaptToQByteArray); \
DEFINE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Type, QString, PluginInstance, CSIRO::Protobuf::ProtobufAdaptors<NameSpace::Type>::adaptToQString)
Definition: protobuftypes.h:71
#define DEFINE_WORKSPACE_DATA_FACTORY(T, P)
Definition: typeddatafactory.h:1426

Define the Protobuf-generated Type in the Namespace and additional types designed for convenient access.

◆ DEFINE_WORKSPACE_PROTOBUF_TYPE

#define DEFINE_WORKSPACE_PROTOBUF_TYPE (   NameSpace,
  Type,
  PluginInstance,
  adaptorToProtobuf,
  adaptorFromProtobuf 
)
Value:
DEFINE_WORKSPACE_DATA_FACTORY(NameSpace::Protobuf::Type, PluginInstance); \
DEFINE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Type, NameSpace::Protobuf::Type, PluginInstance, adaptorToProtobuf); \
DEFINE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Protobuf::Type, NameSpace::Type, PluginInstance, adaptorFromProtobuf); \
DEFINE_WORKSPACE_SIMPLEADAPTOR(QByteArray, NameSpace::Protobuf::Type, PluginInstance, CSIRO::Protobuf::ProtobufAdaptors<NameSpace::Protobuf::Type>::adaptFromQByteArray); \
DEFINE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Protobuf::Type, QByteArray, PluginInstance, CSIRO::Protobuf::ProtobufAdaptors<NameSpace::Protobuf::Type>::adaptToQByteArray); \
DEFINE_WORKSPACE_SIMPLEADAPTOR(NameSpace::Protobuf::Type, QString, PluginInstance, CSIRO::Protobuf::ProtobufAdaptors<NameSpace::Protobuf::Type>::adaptToQString)

Define the Protobuf-generated Type within the NameSpace, along with adaptors connecting the generated type to the Workspace type and any additional types designed for convenient access.