The Published2dArray class template allows to serialize 2-dimensional arrays.
A Serializer is not able to directly handle them but this class does the task automatically by merging the array and storing an additional property for the dimensions.
This class template can only be instantiated if T is a basic type. (see iz.types.BasicTypes).
A destructor is present on this object, but not explicitly documented in the source.
Copies the content of the array to the internal container.
Resets then fills the array using the internal data.
Returns the count of descriptor this class publishes.
Returns a pointer to a descriptor according to its name. Similar to the publication() function template excepted that the result type has not to be specified.
Returns a pointer the index-th descriptor. Index must be within the [0 .. publicationCount] range.
Pointer to the object that has created the descriptor leading to this PropertyPublisher instance.
1 alias Publisher = Published2dArray!uint; 2 Publisher pub = construct!Publisher; 3 scope(exit) destruct(pub); 4 5 auto array = [[0u,1u],[2u,3u,4u],[5u,6u,7u,8u]]; 6 pub.fromArray(array); 7 version (none) publisherToFile(pub, "backup.txt"); 8 version (none) fileToPublisher("backup.txt", pub); 9 pub.toArray(array); 10 assert(array == [[0u,1u],[2u,3u,4u],[5u,6u,7u,8u]]);