#include <DataSet.h>
Inherits GridMate::DataSetBase.
Inherited by GridMate::DataSet< DataType, MarshalerType, ThrottlerType >::BindInterface< C, FuncPtr, CallbackTraits >.
|
| DataSet (const char *debugName, const DataType &value=DataType(), const MarshalerType &marshaler=MarshalerType(), const ThrottlerType &throttler=ThrottlerType()) |
|
void | Set (const DataType &v) |
|
void | Set (DataType &&v) |
|
template<class ... Args> |
void | SetEmplace (Args &&... args) |
|
template<typename FuncPtr > |
bool | Modify (FuncPtr func) |
|
const DataType & | Get () const |
|
MarshalerType & | GetMarshaler () |
|
ThrottlerType & | GetThrottler () |
|
bool | operator== (const DataType &other) const |
|
bool | operator== (const DataSet &other) const |
|
bool | operator!= (const DataType &other) const |
|
bool | operator!= (const DataSet &other) const |
|
void | SetMaxIdleTime (float dt) |
|
float | GetMaxIdleTime () const |
|
bool | CanSet () const |
|
bool | IsDefaultValue () const |
|
void | MarkAsDefaultValue () |
|
void | MarkAsNonDefaultValue () |
|
unsigned int | GetLastUpdateTime () const |
|
ReplicaChunkBase * | GetReplicaChunkBase () const |
|
AZ::u64 | GetRevision () const |
|
void | SetDispatchOverride (DispatchCallback callback) |
| Delta compressed DataSets use an intermediary to catch dispatches of changed DataSets in their logic. More...
|
|
const DispatchCallback & | GetDispatchOverride () const |
| Delta compressed fields override a dispatch. More...
|
|
|
| DataSet (const DataSet &rhs)=delete |
|
DataSet & | operator= (const DataSet &)=delete |
|
void | SetDirty () override |
|
PrepareDataResult | PrepareData (EndianType endianType, AZ::u32 marshalFlags) override |
|
void | Unmarshal (UnmarshalContext &mc) override |
|
void | ResetDirty () override |
|
bool | IsWithinToleranceThreshold () |
|
void | DispatchChangedEvent (const TimeContext &tc) override |
|
| DataSetBase (const char *debugName) |
|
ReadBuffer | GetMarshalData () const |
|
|
DataType | m_value |
|
ThrottlerType | m_throttler |
|
MarshalerType | m_marshaler |
|
float | m_idleTicks |
|
float | m_maxIdleTicks |
|
WriteBufferDynamic | m_streamCache |
|
ReplicaChunkBase * | m_replicaChunk |
| raw pointer, assuming datasets do not exists without replica chunk
|
|
unsigned int | m_lastUpdateTime |
|
bool | m_isDefaultValue |
|
AZ::u64 | m_revision |
| Latest revision number; 0 means unset.
|
|
DispatchCallback | m_override |
|
|
using | DispatchCallback = AZStd::function< void(const TimeContext &tc)> |
|
template<typename DataType, typename MarshalerType = Marshaler<DataType>, typename ThrottlerType = BasicThrottle<DataType>>
class GridMate::DataSet< DataType, MarshalerType, ThrottlerType >
Declares a networked DataSet of type DataType. Optionally pass in a marshaler that can write the data to a stream. Otherwise the DataSet will expect to find a ForwardMarshaler specialized on type DataType. Optionally pass in a throttler that can decide when the data has changed enough to send to the downstream proxies.
◆ DataSet()
template<typename DataType , typename MarshalerType = Marshaler<DataType>, typename ThrottlerType = BasicThrottle<DataType>>
GridMate::DataSet< DataType, MarshalerType, ThrottlerType >::DataSet |
( |
const char * |
debugName, |
|
|
const DataType & |
value = DataType() , |
|
|
const MarshalerType & |
marshaler = MarshalerType() , |
|
|
const ThrottlerType & |
throttler = ThrottlerType() |
|
) |
| |
|
inline |
◆ Get()
template<typename DataType , typename MarshalerType = Marshaler<DataType>, typename ThrottlerType = BasicThrottle<DataType>>
const DataType& GridMate::DataSet< DataType, MarshalerType, ThrottlerType >::Get |
( |
| ) |
const |
|
inline |
Returns the current value of the DataSet.
◆ GetMarshaler()
template<typename DataType , typename MarshalerType = Marshaler<DataType>, typename ThrottlerType = BasicThrottle<DataType>>
MarshalerType& GridMate::DataSet< DataType, MarshalerType, ThrottlerType >::GetMarshaler |
( |
| ) |
|
|
inline |
Returns the marshaler instance.
◆ GetThrottler()
template<typename DataType , typename MarshalerType = Marshaler<DataType>, typename ThrottlerType = BasicThrottle<DataType>>
ThrottlerType& GridMate::DataSet< DataType, MarshalerType, ThrottlerType >::GetThrottler |
( |
| ) |
|
|
inline |
Returns the throttler instance.
◆ Modify()
template<typename DataType , typename MarshalerType = Marshaler<DataType>, typename ThrottlerType = BasicThrottle<DataType>>
template<typename FuncPtr >
bool GridMate::DataSet< DataType, MarshalerType, ThrottlerType >::Modify |
( |
FuncPtr |
func | ) |
|
|
inline |
Modify the DataSet directly without copying it. Call this on the Primary node, passing in a function object that takes the value by reference, optionally modifies the data, and returns true if the data was changed.
◆ operator==()
template<typename DataType , typename MarshalerType = Marshaler<DataType>, typename ThrottlerType = BasicThrottle<DataType>>
bool GridMate::DataSet< DataType, MarshalerType, ThrottlerType >::operator== |
( |
const DataType & |
other | ) |
const |
|
inline |
Returns equality for values of the same type
◆ Set() [1/2]
template<typename DataType , typename MarshalerType = Marshaler<DataType>, typename ThrottlerType = BasicThrottle<DataType>>
void GridMate::DataSet< DataType, MarshalerType, ThrottlerType >::Set |
( |
const DataType & |
v | ) |
|
|
inline |
Modify the DataSet. Call this on the Primary node to change the data, which will be propagated to all proxies.
◆ Set() [2/2]
template<typename DataType , typename MarshalerType = Marshaler<DataType>, typename ThrottlerType = BasicThrottle<DataType>>
void GridMate::DataSet< DataType, MarshalerType, ThrottlerType >::Set |
( |
DataType && |
v | ) |
|
|
inline |
Modify the DataSet. Call this on the Primary node to change the data, which will be propagated to all proxies.
◆ SetEmplace()
template<typename DataType , typename MarshalerType = Marshaler<DataType>, typename ThrottlerType = BasicThrottle<DataType>>
template<class ... Args>
void GridMate::DataSet< DataType, MarshalerType, ThrottlerType >::SetEmplace |
( |
Args &&... |
args | ) |
|
|
inline |
Modify the DataSet. Call this on the Primary node to change the data, which will be propagated to all proxies.
The documentation for this class was generated from the following file:
- Code/Framework/GridMate/GridMate/Replica/DataSet.h