Enhance and stabilize binary_data interface
binary_data is the heart of liboonet, so we must take more care, although it is the best code inside liboonet. Some things must be revised and the interface must be stabilized.
* scale_mem() It works... but we haven't investigate if it could do it better
* operator[] It works... but it does a VERY expensive test for buffer over/under flow. We must follow std::vector specification operator[] does not do range check, at() does range check.
* Implement binary_data to follow "ForwardContainer" concept. (Compatibility with stdlib)
* Drop various constructors and leave only one from cmem_ref.
* Cast to string() It is helpfull but there aren't only std::string in this world, so we must either provide ALL or nothing. [^1]
* Investigate if we are taking full advantage of CoW.
* Use the new mem_ref interface for reacting with external memory objects
* Investigate if we can implement Concat On Read
[1] Still under discussion
Blueprint information
Whiteboard
Proposed Stable Interface 1
-------
binary_data
binary_data(const binary_data &);
binary_data & operator=(const binary_data &);
binary_data operator+
binary_data operator+
size_t find(const_
binary_data sub_data(size_t start_offset, size_t desired_size);
binary_data until(size_t desired_size);
binary_data from(size_t offset);
pointer c_array();
const pointer c_array() const;
size_t size();
// Constants
size_t npos;
binary_data nothing;
Work Items
Dependency tree
* Blueprints in grey have been implemented.