Support attribute "cpp_ptr_type" on table elements marked as "hash" (#4643)
* added intended use-cases to monster_test.fbs * added check for `cpp_ptr_type` on hashed fields added default value 'naked' to `cpp_ptr_type` on hashed fields * added C++ generation of cpp_type vectors removed ctor call for vector fields added condition !vector for cpp_type check added Pack() and UnPack() code generation for vector of hashes added generation of correct resolve/rehash for cpp_type elements * added attribute 'cpp_ptr_type_get' to hold accessor for pointer types possible where '.get()' does not work use case: cpp_ptr_type:"std::weak_ptr", cpp_ptr_type_get:".lock().get()" * run flatc to re-generate headers * added bool param is_ctor to GetDefaultScalarValue() to differentiate between usage places * modified monster_test.fbs to remove usage of shared_ptr/weak_ptr reason: STLport does not support std::shared_ptr and std::weak_ptr * run flatc again to re-generate headers * fixed symbol unique_ptr not in namespace std when building with STLport
Showing
No preview for this file type
This diff is collapsed.
Please
register
or
sign in
to comment