Fixes #13 - By default DCCL is now built with mutexes to protect use of dlog and DynamicProtobufManager. The rest of the previously static classes have been rewritten so that data is stored with the dccl::Codec. This means that use of different instantiations of dccl::Codec can be used by different threads without memory problems (previously this was not the case), but concurrent use of a single Codec between multiple threads would have to be managed by the application.
Fixes #14 - All of DCCL can be used without Boost when compiling with C++17 (which introduced std::any) except for the DCCL Units plugin. When compiling with C++14 Boost is still required. Added CircleCI job for building without Boost.
Added CircleCI Job for building with Mac OS X.
Added clang-tidy and ran numerous fixes and modernization changes with that.
Non backwards compatible changes:
Calls to FieldCodecManager are no longer static. Rather each Codec contains a FieldCodecManagerLocal with the same API as the old FieldCodecManager except all static methods are no longer static. This means that any code that added entries to FieldCodecManager will need to be rewritten, for example:
// old
FieldCodecManager::add<ArithmeticFieldCodec<int32>>("_arithmetic");
// new
dccl::Codec codec;
codec.manager().add<ArithmeticFieldCodec<int32>>("_arithmetic");
If you have code that needs to support multiple versions of DCCL you can add cpp checks like so:
Also, this means that when using a non-standard DCCL ID codec, the API for Codec had to change since previously you would load the non-standard ID codec then instantiate the Codec. With this change we have a chicken-and-egg problem, which is solved with a new template constructor for Codec:
// old
dccl::FieldCodecManager::add<MyIDCodec>("my_custom_id");
dccl::Codec codec("my_custom_id");
// new
dccl::Codec codec("my_custom_id", MyIDCodec());
Also, three methods are removed from dccl::DynamicProtobufManager as they provide direct access to member data:
In their place are member functions (with the same name but with "_call" appended) that can be used to call any of the methods of the respective member data class but while locking a mutex during the call.
For example, calling FindAllExtensions on the user_descriptor_pool
// old
dccl::DynamicProtobufManager::user_descriptor_pool().FindAllExtensions(desc, &user_extensions);
// new
dccl::DynamicProtobufManager::user_descriptor_pool_call(&google::protobuf::DescriptorPool::FindAllExtensions, desc, &user_extensions);
Non backwards compatible changes:
Calls to FieldCodecManager are no longer static. Rather each Codec contains a FieldCodecManagerLocal with the same API as the old FieldCodecManager except all static methods are no longer static. This means that any code that added entries to FieldCodecManager will need to be rewritten, for example:
If you have code that needs to support multiple versions of DCCL you can add cpp checks like so:
Also, this means that when using a non-standard DCCL ID codec, the API for Codec had to change since previously you would load the non-standard ID codec then instantiate the Codec. With this change we have a chicken-and-egg problem, which is solved with a new template constructor for Codec:
Also, three methods are removed from dccl::DynamicProtobufManager as they provide direct access to member data:
In their place are member functions (with the same name but with "_call" appended) that can be used to call any of the methods of the respective member data class but while locking a mutex during the call.
For example, calling FindAllExtensions on the
user_descriptor_pool