![]() |
Plasma Engine
2.0
|
A small wrapper class around an plTelemetryMessage for sending a 'data transfer'. See plDataTransfer for more details. More...
#include <DataTransfer.h>
Public Member Functions | |
plDataTransferObject (plDataTransfer &ref_belongsTo, plStringView sObjectName, plStringView sMimeType, plStringView sFileExtension) | |
plDataTransferObject instances should always be created on the stack and should be very short lived. | |
~plDataTransferObject () | |
The destructor will assert if the data has not been transmitted. | |
plStreamWriter & | GetWriter () |
Returns the stream writer that you need to use to write the data into the object. | |
void | Transmit () |
Will initiate the data transfer. | |
Friends | |
class | plDataTransfer |
A small wrapper class around an plTelemetryMessage for sending a 'data transfer'. See plDataTransfer for more details.
plDataTransferObject::plDataTransferObject | ( | plDataTransfer & | ref_belongsTo, |
plStringView | sObjectName, | ||
plStringView | sMimeType, | ||
plStringView | sFileExtension ) |
plDataTransferObject instances should always be created on the stack and should be very short lived.
BelongsTo | The plDataTransfer through which the data is going to be sent shortly. |
szObjectName | The name of the data blob. Since several data transfers can be made through the same plDataTransfer, this is used to identify the different pieces of information. For example when sending each texture of a G-Buffer, szObjectName could be 'diffuse' when sending the diffuse channel, 'depth' for the depth buffer content, etc. |
szMimeType | The mime type for the data blob. Tools such as plInspector can use this information to determine whether they can display it directly or in some other editor. |
szFileExtension | The file extension that should be used when the user wants to store the data on disk. This is separate from the mime type, as you might want to send data with mime type 'text/json' but store it on disk as '.savegame'. |
|
inline |
Returns the stream writer that you need to use to write the data into the object.
When finished writing all data to the object, you should call Transmit().