diff options
Diffstat (limited to 'node/node.hpp')
| -rw-r--r-- | node/node.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/node/node.hpp b/node/node.hpp index a058916..3233ba2 100644 --- a/node/node.hpp +++ b/node/node.hpp @@ -9,6 +9,7 @@ #include "cmix.h" #include "cmix.pb.h" +#include <google/protobuf/arena.h> #include <boost/asio/io_service.hpp> @@ -49,6 +50,15 @@ struct NodeNetworkSettings { unsigned int minimum_nr_messages; ///< The minimum number of available messages before starting to run a mix; }; +template <typename T> +struct ArenaMessage { + google::protobuf::Arena arena; + + T& get() { + return *google::protobuf::Arena::CreateMessage<T>(&arena); + } +}; + /*! * \brief The Node class */ |
