ezEngine  Milestone 7
ezDataTransferObject Class Reference

A small wrapper class around an ezTelemetryMessage for sending a 'data transfer'. See ezDataTransfer for more details. More...

#include <DataTransfer.h>

Public Member Functions

 ezDataTransferObject (ezDataTransfer &BelongsTo, const char *szObjectName, const char *szMimeType, const char *szFileExtension)
 ezDataTransferObject instances should always be created on the stack and should be very short lived. More...
 
 ~ezDataTransferObject ()
 The destructor will assert if the data has not been transmitted.
 
ezStreamWriterBaseGetWriter ()
 Returns the stream writer that you need to use to write the data into the object. More...
 
void Transmit ()
 Will initiate the data transfer.
 

Private Member Functions

 EZ_DISALLOW_COPY_AND_ASSIGN (ezDataTransferObject)
 

Private Attributes

bool m_bHasBeenTransferred
 
ezDataTransferm_BelongsTo
 
ezTelemetryMessage m_Msg
 

Friends

class ezDataTransfer
 

Detailed Description

A small wrapper class around an ezTelemetryMessage for sending a 'data transfer'. See ezDataTransfer for more details.

Constructor & Destructor Documentation

ezDataTransferObject::ezDataTransferObject ( ezDataTransfer BelongsTo,
const char *  szObjectName,
const char *  szMimeType,
const char *  szFileExtension 
)

ezDataTransferObject instances should always be created on the stack and should be very short lived.

Parameters
BelongsToThe ezDataTransfer through which the data is going to be sent shortly.
szObjectNameThe name of the data blob. Since several data transfers can be made through the same ezDataTransfer, 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.
szMimeTypeThe mime type for the data blob. Tools such as ezInspector can use this information to determine whether they can display it directly or in some other editor.
szFileExtensionThe 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'.

Member Function Documentation

ezStreamWriterBase& ezDataTransferObject::GetWriter ( )
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().


The documentation for this class was generated from the following files: