10 #ifndef CMZN_STREAM_HPP__
11 #define CMZN_STREAM_HPP__
13 #include "zinc/stream.h"
20 class StreamresourceFile;
21 class StreamresourceMemory;
40 cmzn_streamresource_id id;
48 explicit Streamresource(cmzn_streamresource_id in_streamresource_id) : id(in_streamresource_id)
56 cmzn_streamresource_id temp_id = cmzn_streamresource_access(streamResource.id);
59 cmzn_streamresource_destroy(&
id);
69 cmzn_streamresource_destroy(&
id);
88 cmzn_streamresource_id
getId()
const
131 Streamresource(reinterpret_cast<cmzn_streamresource_id>(streamresource_file_id))
142 return cmzn_streamresource_file_get_name(
143 reinterpret_cast<cmzn_streamresource_file_id>(
id));
165 Streamresource(reinterpret_cast<cmzn_streamresource_id>(streamresource_memory_id))
197 cmzn_streaminformation_id id;
205 explicit Streaminformation(cmzn_streaminformation_id in_streaminformation_id) : id(in_streaminformation_id)
209 id(cmzn_streaminformation_access(streamInformation.id))
250 cmzn_streaminformation_id temp_id = cmzn_streaminformation_access(streamInformation.id);
253 cmzn_streaminformation_destroy(&
id);
263 cmzn_streaminformation_destroy(&
id);
282 cmzn_streaminformation_id
getId()
const
305 cmzn_streaminformation_create_streamresource_file(
id, file_name)));
326 cmzn_streaminformation_create_streamresource_memory(
id)));
347 unsigned int buffer_length)
350 cmzn_streaminformation_create_streamresource_memory_buffer(
id, buffer, buffer_length)));
364 cmzn_streaminformation_get_resource_data_compression_type(
365 reinterpret_cast<cmzn_streaminformation_id>(
id), resource.
getId()));
382 return cmzn_streaminformation_set_resource_data_compression_type(
383 reinterpret_cast<cmzn_streaminformation_id>(
id), resource.
getId(),
384 static_cast<cmzn_streaminformation_data_compression_type
>(dataCompressionType));
396 cmzn_streaminformation_get_data_compression_type(
397 reinterpret_cast<cmzn_streaminformation_id>(
id)));
411 return cmzn_streaminformation_set_data_compression_type(
412 reinterpret_cast<cmzn_streaminformation_id>(
id),
413 static_cast<cmzn_streaminformation_data_compression_type>(dataCompressionType));
StreamresourceFile castFile()
Definition: stream.hpp:170
A derived streamresource describing a file.
Definition: stream.hpp:122
A description of a resource for reading from or writing to.
Definition: stream.hpp:36
char * getName()
Definition: stream.hpp:140
A derived stream resource describing a block of memory.
Definition: stream.hpp:156
StreamresourceMemory castMemory()
Definition: stream.hpp:175
cmzn_streamresource_id getId() const
Definition: stream.hpp:88
bool isValid() const
Definition: stream.hpp:78