Creating RED Streams

HOOPS Luminate provides an abstraction of the I/O devices called RED::IStream. By creating streams, you can redirect I/O operations either to files on disk or memory buffers. To create a stream, you must use the RED::Factory:

Case of a Memory Stream

RED::Object* mem_stream = RED::Factory::CreateMemoryStream();

Case of a File Stream

RED::Object* file_stream = RED::Factory::CreateFileStream( "./my_file.red" );

After the stream creation, you can get access to its RED::IStream interface to start using it.