fpmas 1.6
Classes | Namespaces | Macros | Typedefs
serializer_set_up.h File Reference
#include <stdexcept>
#include <typeindex>
#include "fpmas/api/utils/ptr_wrapper.h"
#include "fpmas/utils/log.h"
Include dependency graph for serializer_set_up.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  fpmas::exceptions::BadIdException
 
class  fpmas::exceptions::BadTypeException
 

Namespaces

namespace  fpmas
 
namespace  fpmas::exceptions
 

Macros

#define FPMAS_TYPE_STR(T)   typeid(T).name()
 
#define FPMAS_TYPE_INDEX   std::uint_fast8_t
 

Typedefs

template<typename Agent >
using fpmas::TypedAgentPtr = api::utils::PtrWrapper< Agent >
 

Detailed Description

Contains features useful for both JSON and ObjectPack Agent serialization.

Macro Definition Documentation

◆ FPMAS_TYPE_STR

#define FPMAS_TYPE_STR (   T)    typeid(T).name()

Utility macro used to retrieve the name of the typeid of T

◆ FPMAS_TYPE_INDEX

#define FPMAS_TYPE_INDEX   std::uint_fast8_t

Type used to serialize std::type_index instances, that is notably used by the polymorphic Agent serialization process.

More precisely, the specified unsigned integer type must be able to represent the count of Agent passed to the FPMAS_REGISTER_AGENT_TYPES() macro.

In consequence, the default std::uint_fast8_t type should be able to represent 256 agent types while maximizing performances.

But an other unsigned integer types can be specified at compile time using cmake -DFPMAS_TYPE_INDEX=<unsigned integer type> ..