![]() |
Diarkis C++Client Library API Document
|
Interface class for Field. More...
#include <field.h>
Public Member Functions | |
| virtual | ~IDiarkisField () |
| Destructor for the IDiarkisField class. More... | |
| virtual void | SetLoggerFactory (std::shared_ptr< IDiarkisLoggerFactory > loggerFactory, Diarkis::StdString loggerNameSuffix)=0 |
| Register a logger. More... | |
| virtual bool | SetupAsTcp (const std::shared_ptr< IDiarkisTcp > &tcp)=0 |
| Initialize IDiarkisField as a TCP protocol. More... | |
| virtual bool | SetupAsUdp (const std::shared_ptr< IDiarkisUdp > &udp)=0 |
| Initialize IDiarkisField as a UDP protocol. More... | |
| virtual Diarkis::System::Result | Disappear ()=0 |
| Set up Field as a UDP protocol. More... | |
| virtual Diarkis::System::Result | Leave ()=0 |
| Notify that you are leaving the Field. More... | |
| virtual Diarkis::System::Result | Join (int64_t x, int64_t y, int64_t z, uint16_t syncLimit, uint8_t customFilterID, const uint8_t *message, size_t messageSize, bool reliable=false)=0 |
| Join Field. More... | |
| virtual Diarkis::System::Result | Join (int64_t x, int64_t y, int64_t z, uint16_t syncLimit, uint8_t customFilterID, const Diarkis::StdVector< uint8_t > &message, bool reliable=false)=0 |
| Same as Join() More... | |
| virtual Diarkis::System::Result | Sync (int64_t x, int64_t y, int64_t z, uint16_t syncLimit, uint8_t customFilterID, const uint8_t *message, size_t messageSize, bool reliable=true)=0 |
| Sends data to other clients in the Field. More... | |
| virtual Diarkis::System::Result | Sync (int64_t x, int64_t y, int64_t z, uint16_t syncLimit, uint8_t customFilterID, const Diarkis::StdVector< uint8_t > &message, bool reliable=true)=0 |
| Same as Sync() More... | |
| virtual std::shared_ptr< IDiarkisEvent< const Diarkis::StdVector< Diarkis::StdVector< uint8_t > > & > > | GetResponseSyncInitEvent ()=0 |
| Get the callback event that will be called to get notification when another client first syncs to the Field. More... | |
| virtual std::shared_ptr< IDiarkisEvent< const DiarkisSuccessEventArgs & > > | GetJoinEvent ()=0 |
| Get the response event when the user joins the Field. More... | |
| virtual std::shared_ptr< IDiarkisEvent< const Diarkis::StdVector< uint8_t > & > > | GetSyncEvent ()=0 |
| Get callback event to be called when synchronizing the location of nearby clients in the Field. More... | |
| virtual std::shared_ptr< IDiarkisEvent< const Diarkis::StdString & > > | GetDisappearEvent ()=0 |
| Get the callback event that is called when another client disappears from the Field. More... | |
| virtual std::shared_ptr< IDiarkisEvent< void * > > | GetReconnectEvent ()=0 |
| Get the callback event that is called when the Field is reconnected. More... | |
| virtual std::shared_ptr< IDiarkisEvent< const DiarkisSuccessEventArgs & > > | GetLeaveEvent ()=0 |
| Get the response event when exiting from a Field. More... | |
Interface class for Field.
|
inlinevirtual |
Destructor for the IDiarkisField class.
|
pure virtual |
Register a logger.
| [in] | loggerFactory | Pointer to IDiarkisLoggerFactory |
| [in] | loggerNameSuffix | String to be added to the tag that will be output to the log |
|
pure virtual |
Initialize IDiarkisField as a TCP protocol.
|
pure virtual |
Initialize IDiarkisField as a UDP protocol.
|
pure virtual |
Set up Field as a UDP protocol.
|
pure virtual |
Notify that you are leaving the Field.
|
pure virtual |
Join Field.
Callback events registered with GetJoinEvent() (e.g. OnJoin) will be triggered.
| [in] | x | Value of X coordinate in Field (width) |
| [in] | y | Value of Y coordinate in Field (depth) |
| [in] | z | Value of Z coordinate in Field (difference in spatial level, not height) |
| [in] | syncLimit | number of synchronizations |
| [in] | customFilterID | Indicates the use of a filter function defined by the server during synchronization. 0 indicates that the filter function is not used. |
| [in] | message | Array of data to send to other clients |
| [in] | messageSize | Length of the message |
| [in] | reliable | Determines whether to send via reliable communication (RUDP); ignored for TCP protocol. |
|
pure virtual |
Same as Join()
|
pure virtual |
Sends data to other clients in the Field.
Callback events registered with GetSyncEvent() (e.g. OnSync) will be triggered.
| [in] | x | Value of X coordinate in Field (width) |
| [in] | y | Value of Y coordinate in Field (depth) |
| [in] | z | Value of Z coordinate in Field (spatial difference, not height) |
| [in] | syncLimit | Number of synchronizations |
| [in] | customFilterID | Indicates the use of a filter function defined by the server during synchronization. 0 indicates that the filter function is not used. |
| [in] | message | Data to send to other clients |
| [in] | messageSize | Length of the message |
| [in] | reliable | Determines whether to send with reliable communication (RUDP) or not (UDP); ignored for the TCP protocol. |
|
pure virtual |
Same as Sync()
|
pure virtual |
Get the callback event that will be called to get notification when another client first syncs to the Field.
|
pure virtual |
Get the response event when the user joins the Field.
|
pure virtual |
Get callback event to be called when synchronizing the location of nearby clients in the Field.
|
pure virtual |
Get the callback event that is called when another client disappears from the Field.
|
pure virtual |
Get the callback event that is called when the Field is reconnected.
|
pure virtual |
Get the response event when exiting from a Field.