Skip to content

Mirror::SyncSet

More...

Inherits from ISet< T >, SyncObject

Inherited by SyncHashSet< T >, SyncSortedSet< T >

Public Events

Name
SyncSetChanged Callback()

Public Functions

Name
delegate void SyncSetChanged(Operation op, T item)
SyncSet(ISet< T > objects)
void Reset()
Resets the SyncObject so that it can be re-used
void Flush()
Discard all the queued changes
void OnSerializeAll(NetworkWriter writer)
Write a full copy of the object
void OnSerializeDelta(NetworkWriter writer)
Write the changes made to the object since last sync
void OnDeserializeAll(NetworkReader reader)
Reads a full copy of the object
void OnDeserializeDelta(NetworkReader reader)
Reads the changes made to the object since last sync
bool Add(T item)
void Clear()
bool Contains(T item)
void CopyTo(T [] array, int index)
bool Remove(T item)
IEnumerator< T > GetEnumerator()
void ExceptWith(IEnumerable< T > other)
void IntersectWith(IEnumerable< T > other)
bool IsProperSubsetOf(IEnumerable< T > other)
bool IsProperSupersetOf(IEnumerable< T > other)
bool IsSubsetOf(IEnumerable< T > other)
bool IsSupersetOf(IEnumerable< T > other)
bool Overlaps(IEnumerable< T > other)
bool SetEquals(IEnumerable< T > other)
void SymmetricExceptWith(IEnumerable< T > other)
void UnionWith(IEnumerable< T > other)

Public Properties

Name
bool IsReadOnly

Public Attributes

Name
int Count
bool IsDirty

Protected Attributes

Name
readonly ISet< T > objects

Detailed Description

template <T >
class Mirror::SyncSet;

Public Events Documentation

event Callback

SyncSetChanged Callback()

Public Functions Documentation

function SyncSetChanged

delegate void SyncSetChanged(
    Operation op,
    T item
)

function SyncSet

inline SyncSet(
    ISet< T > objects
)

function Reset

inline void Reset()

Resets the SyncObject so that it can be re-used

Reimplements: Mirror::SyncObject::Reset

function Flush

void Flush()

Discard all the queued changes

Reimplements: Mirror::SyncObject::Flush

Consider the object fully synchronized with clients

function OnSerializeAll

inline void OnSerializeAll(
    NetworkWriter writer
)

Write a full copy of the object

Parameters:

  • writer

Reimplements: Mirror::SyncObject::OnSerializeAll

function OnSerializeDelta

inline void OnSerializeDelta(
    NetworkWriter writer
)

Write the changes made to the object since last sync

Parameters:

  • writer

Reimplements: Mirror::SyncObject::OnSerializeDelta

function OnDeserializeAll

inline void OnDeserializeAll(
    NetworkReader reader
)

Reads a full copy of the object

Parameters:

  • reader

Reimplements: Mirror::SyncObject::OnDeserializeAll

function OnDeserializeDelta

inline void OnDeserializeDelta(
    NetworkReader reader
)

Reads the changes made to the object since last sync

Parameters:

  • reader

Reimplements: Mirror::SyncObject::OnDeserializeDelta

function Add

inline bool Add(
    T item
)

function Clear

inline void Clear()

function Contains

bool Contains(
    T item
)

function CopyTo

void CopyTo(
    T [] array,
    int index
)

function Remove

inline bool Remove(
    T item
)

function GetEnumerator

IEnumerator< T > GetEnumerator()

function ExceptWith

inline void ExceptWith(
    IEnumerable< T > other
)

function IntersectWith

inline void IntersectWith(
    IEnumerable< T > other
)

function IsProperSubsetOf

bool IsProperSubsetOf(
    IEnumerable< T > other
)

function IsProperSupersetOf

bool IsProperSupersetOf(
    IEnumerable< T > other
)

function IsSubsetOf

bool IsSubsetOf(
    IEnumerable< T > other
)

function IsSupersetOf

bool IsSupersetOf(
    IEnumerable< T > other
)

function Overlaps

bool Overlaps(
    IEnumerable< T > other
)

function SetEquals

bool SetEquals(
    IEnumerable< T > other
)

function SymmetricExceptWith

inline void SymmetricExceptWith(
    IEnumerable< T > other
)

function UnionWith

inline void UnionWith(
    IEnumerable< T > other
)

Public Property Documentation

property IsReadOnly

bool IsReadOnly;

Public Attributes Documentation

variable Count

int Count => objects.Count;

variable IsDirty

bool IsDirty => changes.Count > 0;

Protected Attributes Documentation

variable objects

readonly ISet< T > objects;

Updated on 21 January 2021 at 12:03:36 UTC