Diarkis C++Client Library API Document
Diarkis Namespace Reference

Namespaces

 Commands
 
 Exceptions
 
 Modules
 
 Network
 
 Results
 
 System
 

Classes

struct  DiarkisAllocatorDeleter
 
struct  DiarkisAllocatorDeleter< T[]>
 
struct  DiarkisCheckNATTypeEventArgs
 Arguments of the callback event called when the response of Diarkis::Modules::IDiarkisRoom::SendCheckNATType() is received. More...
 
struct  DiarkisConnectionEventArgs
 Arguments of the callback events when connecting to the server. More...
 
class  DiarkisDefaultAllocator
 Diarkisランタイムのデフォルトアロケーター。 More...
 
struct  DiarkisDirectMessageEventArgs
 Arguments of the callback event called when DM received. More...
 
struct  DiarkisExceptionEventArgs
 Arguments of the callback event called when sending or receiving fails in P2P. More...
 
struct  DiarkisFailEventArgs
 Arguments of the callback event called when a P2P connection fails. More...
 
struct  DiarkisGroupEventArgs
 Arguments of the callback event called when the group is created. More...
 
struct  DiarkisMessageEventArgs
 Arguments of the callback event called when a message is received by P2P. More...
 
struct  DiarkisMMHostEventArgs
 Argument of the callback event called when MatchMaker's HostMatchmaking or TeamHostMatchmaking is executed. More...
 
struct  DiarkisMMJoinResponseEventArgs
 Arguments of the callback event called when MatchMaker Join response is received. More...
 
struct  DiarkisMMResponseEventArgs
 Arguments of the callback event called when MatchMaker response is received. More...
 
struct  DiarkisMMResultEventArgs
 Argument of the callback event called when MatchMaker's Search or TeamSearch is executed. More...
 
struct  DiarkisMMStringEventArgs
 Arguments of the callback event called when MatchMaker host has changed. More...
 
struct  DiarkisMMSyncEventArgs
 Arguments of the callback event called when MatchMaker push is received. More...
 
struct  DiarkisMMTicketTypeEventArgs
 Arguments of the callback event to be called when TicketCancel push is received. More...
 
struct  DiarkisP2PDisconnectEventArgs
 Arguments of the callback event called when a P2P is disconnected. More...
 
struct  DiarkisP2PEventArgs
 Arguments of the callback event called when start P2P connection. More...
 
struct  DiarkisPayloadEventArgs
 Arguments of the callback event called when a payload is sent or received. More...
 
struct  DiarkisPushEventArgs
 Argument of the callback event called when a UDP or TCP Push is received. More...
 
struct  DiarkisRawPayloadEventArgs
 
struct  DiarkisReadyEventArgs
 Arguments of the callback event called when a P2P connection is completed. More...
 
struct  DiarkisResponseEventArgs
 Argument of the callback event called when a UDP or TCP Response is received. More...
 
struct  DiarkisRoomChatEventArgs
 Arguments of callback events called when received the chat message by Diarkis::Modules::IDiarkisRoom::SendChatMessage. More...
 
struct  DiarkisRoomChatLogEventArgs
 Arguments of callback events called when received the result of Diarkis::Modules::IDiarkisRoom::GetChatLog() More...
 
struct  DiarkisRoomCreationEventArgs
 Arguments of the callback event called when created a room. More...
 
struct  DiarkisRoomFindByTypeEventArgs
 Arguments of callback events called when received the result of Diarkis::Modules::IDiarkisRoom::FindRoomsByType() More...
 
struct  DiarkisRoomGetOwnerIDEventArgs
 Argument of the callback event called when the Room Owner's User ID is retrieved. More...
 
struct  DiarkisRoomIncrementPropertyEventArgs
 Argument of the callback event called when the value of the Room property is increased or decreased. More...
 
struct  DiarkisRoomIncrementPropertySyncEventArgs
 Argument of the callback event called when synchronizing the value of a Room property. More...
 
struct  DiarkisRoomJoinEventArgs
 Arguments of the callback event called when joined a room. More...
 
struct  DiarkisRoomMemberIDsEventArgs
 Arguments of the callback event called when retrieving the list of participating members of the Room. More...
 
struct  DiarkisRoomMigrateCompleteEventArgs
 Arguments of the callback event called when room migration competed. More...
 
struct  DiarkisRoomNumberOfMembersEventArgs
 Arguments of the callback event called when retrieving the number of members in the Room. More...
 
struct  DiarkisRoomObjectUpdateEventArgs
 Arguments of callback events called when update objects by Diarkis::Modules::IDiarkisRoom::UpdateObject() More...
 
struct  DiarkisRoomObjectUpdateResponseEventArgs
 Arguments of callback events called when received the response of Diarkis::Modules::IDiarkisRoom::UpdateObject() More...
 
struct  DiarkisRoomPayloadEventArgs
 Arguments of callback events called when executing Room Regiser, Reserve, etc. More...
 
struct  DiarkisRoomPropertiesEventArgs
 Argument of the callback event called when the Room property is acquired. More...
 
struct  DiarkisRoomSuccessEventArgs
 Arguments for callback events when exiting a Room or updating Room properties. More...
 
struct  DiarkisSessionCreateResponseEventArgs
 Arguments of the callback event called when received Session Create response. More...
 
struct  DiarkisSessionInfoEventArgs
 Arguments of the callback event called when received Session Info. More...
 
struct  DiarkisSessionInviteEventArgs
 Arguments of the callback event called when received Session Invite. More...
 
struct  DiarkisSessionNotificationEventArgs
 Arguments of the callback event called when received Session Notification. More...
 
struct  DiarkisSessionResponseEventArgs
 Arguments of the callback event called when received Session response. More...
 
struct  DiarkisStdAllocator
 
struct  DiarkisSuccessEventArgs
 Arguments of the callback event called when joining or leaving a Field. More...
 
struct  DiarkisTcpConnectionStateChangedEventArgs
 
struct  DiarkisUdpEchoEventArgs
 Arguments of the callback event called when an UDP Echo is received. More...
 
struct  DiarkisUdpPingEventArgs
 Arguments of the callback event called when an UDP Ping is received. More...
 
class  ICustomAllocator
 Base class for implementing a custom memory allocator. More...
 
class  IDiarkisComponent
 Implement this interface to be able to register to a scheduler for periodic update. More...
 
class  IDiarkisEvent
 マルチキャストイベントを表す汎用インターフェース。 イベントが発生すると、登録されたすべてのラムダ式が呼び出されます。 More...
 
class  IDiarkisEventRpcID
 
class  IDiarkisLogger
 Interface class for manipulating logging functions. More...
 
class  IDiarkisLoggerFactory
 
class  IFixedAreaMemoryAllocator
 
struct  MatchMakerResultItem
 Structure to contain MatchMaker search results. More...
 
struct  P2PClientAddr
 
struct  RoomChatData
 Represents a chat message data with its sender user ID and timestamp in milliseconds. More...
 
struct  RoomListItem
 Structure to contain the results of a FindRoomsByType search. More...
 
class  StdString
 
struct  StdStringHash
 
struct  StdStringHash< StdString >
 
class  StdVector
 

Typedefs

template<class T >
using StdUniquePtr = std::unique_ptr< T, Diarkis::DiarkisAllocatorDeleter< T > >
 
template<class T >
using StdBasicStringBuf = std::basic_stringbuf< T, std::char_traits< T >, DiarkisStdAllocator< T > >
 
template<class T >
using StdBasicIStringStream = std::basic_istringstream< T, std::char_traits< T >, DiarkisStdAllocator< T > >
 
template<class T >
using StdBasicOStringStream = std::basic_ostringstream< T, std::char_traits< T >, DiarkisStdAllocator< T > >
 
template<class T >
using StdBasicStringStream = std::basic_stringstream< T, std::char_traits< T >, DiarkisStdAllocator< T > >
 
using StdStringBuf = StdBasicStringBuf< char >
 
using StdIStringStream = StdBasicIStringStream< char >
 
using StdOStringStream = StdBasicOStringStream< char >
 
using StdStringStream = StdBasicStringStream< char >
 
template<class T >
using StdDeque = std::deque< T, Diarkis::DiarkisStdAllocator< T > >
 
template<class T >
using StdQueue = std::queue< T, StdDeque< T > >
 
template<class Key , class Value >
using StdMap = std::map< Key, Value, std::less< Key >, Diarkis::DiarkisStdAllocator< std::pair< const Key, Value > >>
 
template<class Key , class Value >
using StdUnorderedMap = std::unordered_map< Key, Value, StdStringHash< Key >, std::equal_to< Key >, Diarkis::DiarkisStdAllocator< std::pair< const Key, Value > >>
 

Enumerations

enum  DiarkisLoggerSeverity : std::uint8_t {
  DiarkisLoggerSeverity::Trace = 0, DiarkisLoggerSeverity::Verbose, DiarkisLoggerSeverity::Debug, DiarkisLoggerSeverity::Info,
  DiarkisLoggerSeverity::Warning, DiarkisLoggerSeverity::Error, DiarkisLoggerSeverity::Fatal, DiarkisLoggerSeverity::None
}
 Log severity level. More...
 
enum  RoomObjectMode : std::uint8_t { RoomObjectMode::OBJ_INC_MODE = 1, RoomObjectMode::OBJ_SET_MODE, RoomObjectMode::OBJ_DEL_MODE }
 An enumerated type that represents how to update a room object. More...
 
enum  DiarkisConnectStatus : std::int32_t { DiarkisConnectStatus::DCS_Success = 0, DiarkisConnectStatus::DCS_Timeout = -1 }
 Connection status with a server. More...
 

Functions

const char * GetVersion ()
 
DIARKIS_EXPORT ICustomAllocatorSetCustomAllocator (ICustomAllocator *pAllocator)
 Specify the custom allocator. More...
 
DIARKIS_EXPORT DiarkisDefaultAllocatorGetDefaultAllocator ()
 Get the Diarkis default allocator pointer. More...
 
DIARKIS_EXPORT IFixedAreaMemoryAllocatorGetFixedAreaMemoryAllocator ()
 Get the pointer of the instance of FixedAreaMemoryAllocator. More...
 
DIARKIS_EXPORT void * DiarkisAlloc (size_t size, int flag=0)
 
DIARKIS_EXPORT void * DiarkisAlignedAlloc (size_t size, size_t align, int flag=0)
 
DIARKIS_EXPORT void DiarkisFree (void *ptr)
 
template<class T , class... _Types>
T * DiarkisNew (_Types &&... _Args)
 
template<class T , typename std::enable_if< std::is_array< T >::value, int >::type = 0>
std::remove_extent< T >::type * DiarkisNew (const size_t N)
 
template<class T >
void DiarkisDelete (T *ptr)
 
template<class T , class U >
bool operator== (const DiarkisStdAllocator< T > &, const DiarkisStdAllocator< U > &)
 
template<class T , class U >
bool operator!= (const DiarkisStdAllocator< T > &, const DiarkisStdAllocator< U > &)
 
template<class T , class... _Types, typename std::enable_if<!std::is_array< T >::value, int >::type = 0>
StdUniquePtr< T > DiarkisAllocUnique (_Types &&... _Args)
 
template<class T , typename std::enable_if< std::is_array< T >::value, int >::type = 0>
StdUniquePtr< T > DiarkisAllocUnique (const size_t N)
 
template<class T , class... _Types>
std::shared_ptr< T > DiarkisAllocShared (_Types &&... _Args)
 
StdString operator+ (const StdString &lhs, const StdString &rhs)
 
StdString operator+ (const StdString &lhs, const char *rhs)
 
StdString operator+ (const char *lhs, const StdString &rhs)
 
StdString operator+ (const StdString &lhs, const char rhs)
 
StdString operator+ (const char lhs, const StdString &rhs)
 
StdString to_string (int value)
 
StdString to_string (long value)
 
StdString to_string (long long value)
 
StdString to_string (unsigned value)
 
StdString to_string (unsigned long value)
 
StdString to_string (unsigned long long value)
 
StdString to_string (float value)
 
StdString to_string (double value)
 
StdString to_string (long double value)
 
bool DIARKIS_EXPORT ParseErrStruct (uint8_t status, const Diarkis::StdVector< uint8_t > &payload, uint16_t &errCode, Diarkis::StdString &errString)
 Parse payload of the error struct data, which is received in the response handlers. More...
 

Typedef Documentation

◆ StdUniquePtr

template<class T >
using Diarkis::StdUniquePtr = typedef std::unique_ptr<T, Diarkis::DiarkisAllocatorDeleter<T> >

◆ StdBasicStringBuf

template<class T >
using Diarkis::StdBasicStringBuf = typedef std::basic_stringbuf<T, std::char_traits<T>, DiarkisStdAllocator<T> >

◆ StdBasicIStringStream

template<class T >
using Diarkis::StdBasicIStringStream = typedef std::basic_istringstream<T, std::char_traits<T>, DiarkisStdAllocator<T> >

◆ StdBasicOStringStream

template<class T >
using Diarkis::StdBasicOStringStream = typedef std::basic_ostringstream<T, std::char_traits<T>, DiarkisStdAllocator<T> >

◆ StdBasicStringStream

template<class T >
using Diarkis::StdBasicStringStream = typedef std::basic_stringstream<T, std::char_traits<T>, DiarkisStdAllocator<T> >

◆ StdStringBuf

◆ StdIStringStream

◆ StdOStringStream

◆ StdStringStream

◆ StdDeque

template<class T >
using Diarkis::StdDeque = typedef std::deque<T, Diarkis::DiarkisStdAllocator<T> >

◆ StdQueue

template<class T >
using Diarkis::StdQueue = typedef std::queue<T, StdDeque<T> >

◆ StdMap

template<class Key , class Value >
using Diarkis::StdMap = typedef std::map<Key, Value, std::less<Key>, Diarkis::DiarkisStdAllocator<std::pair<const Key, Value> >>

◆ StdUnorderedMap

template<class Key , class Value >
using Diarkis::StdUnorderedMap = typedef std::unordered_map<Key, Value, StdStringHash<Key>, std::equal_to<Key>, Diarkis::DiarkisStdAllocator<std::pair<const Key, Value> >>

Enumeration Type Documentation

◆ DiarkisLoggerSeverity

enum Diarkis::DiarkisLoggerSeverity : std::uint8_t
strong

Log severity level.

Enumerator
Trace 

Displays all levels. The send and receive payload will be dumped.
Note that the log file will be large in size.

Verbose 

Displays verbose, debug, info, warning, error, and fatal level.

Debug 

Displays debug, info, warning, error, and fatal level.

Info 

Displays info, warning, error, and fatal level.

Warning 

Displays warning, error, and fatal level.

Error 

Displays fatal and error level.

Fatal 

Displays only fatal level.

None 

No log.

◆ RoomObjectMode

enum Diarkis::RoomObjectMode : std::uint8_t
strong

An enumerated type that represents how to update a room object.

Enumerator
OBJ_INC_MODE 

Increments the value of object.

OBJ_SET_MODE 

Add or replace object.

OBJ_DEL_MODE 

Delete object.

◆ DiarkisConnectStatus

enum Diarkis::DiarkisConnectStatus : std::int32_t
strong

Connection status with a server.

Enumerator
DCS_Success 

Connection succeeded.

DCS_Timeout 

Connection timeout.

Function Documentation

◆ GetVersion()

const char* Diarkis::GetVersion ( )
inline
Here is the caller graph for this function:

◆ SetCustomAllocator()

DIARKIS_EXPORT ICustomAllocator* Diarkis::SetCustomAllocator ( ICustomAllocator pAllocator)

Specify the custom allocator.

◆ GetDefaultAllocator()

DIARKIS_EXPORT DiarkisDefaultAllocator* Diarkis::GetDefaultAllocator ( )

Get the Diarkis default allocator pointer.

Returns
The pointer to the Diarkis default allocator.

◆ GetFixedAreaMemoryAllocator()

DIARKIS_EXPORT IFixedAreaMemoryAllocator* Diarkis::GetFixedAreaMemoryAllocator ( )

Get the pointer of the instance of FixedAreaMemoryAllocator.

Returns
The pointer to the FixedAreaMemoryAllocator

◆ DiarkisAlloc()

DIARKIS_EXPORT void* Diarkis::DiarkisAlloc ( size_t  size,
int  flag = 0 
)
Here is the caller graph for this function:

◆ DiarkisAlignedAlloc()

DIARKIS_EXPORT void* Diarkis::DiarkisAlignedAlloc ( size_t  size,
size_t  align,
int  flag = 0 
)

◆ DiarkisFree()

DIARKIS_EXPORT void Diarkis::DiarkisFree ( void *  ptr)
Here is the caller graph for this function:

◆ DiarkisNew() [1/2]

template<class T , class... _Types>
T* Diarkis::DiarkisNew ( _Types &&...  _Args)
inline
Here is the call graph for this function:

◆ DiarkisNew() [2/2]

template<class T , typename std::enable_if< std::is_array< T >::value, int >::type = 0>
std::remove_extent<T>::type* Diarkis::DiarkisNew ( const size_t  N)
inline
Here is the call graph for this function:

◆ DiarkisDelete()

template<class T >
void Diarkis::DiarkisDelete ( T *  ptr)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator==()

template<class T , class U >
bool Diarkis::operator== ( const DiarkisStdAllocator< T > &  ,
const DiarkisStdAllocator< U > &   
)

◆ operator!=()

template<class T , class U >
bool Diarkis::operator!= ( const DiarkisStdAllocator< T > &  ,
const DiarkisStdAllocator< U > &   
)

◆ DiarkisAllocUnique() [1/2]

template<class T , class... _Types, typename std::enable_if<!std::is_array< T >::value, int >::type = 0>
StdUniquePtr<T> Diarkis::DiarkisAllocUnique ( _Types &&...  _Args)
inline

◆ DiarkisAllocUnique() [2/2]

template<class T , typename std::enable_if< std::is_array< T >::value, int >::type = 0>
StdUniquePtr<T> Diarkis::DiarkisAllocUnique ( const size_t  N)
inline

◆ DiarkisAllocShared()

template<class T , class... _Types>
std::shared_ptr<T> Diarkis::DiarkisAllocShared ( _Types &&...  _Args)
inline

◆ operator+() [1/5]

StdString Diarkis::operator+ ( const StdString lhs,
const StdString rhs 
)
inline
Here is the caller graph for this function:

◆ operator+() [2/5]

StdString Diarkis::operator+ ( const StdString lhs,
const char *  rhs 
)
inline
Here is the call graph for this function:

◆ operator+() [3/5]

StdString Diarkis::operator+ ( const char *  lhs,
const StdString rhs 
)
inline
Here is the call graph for this function:

◆ operator+() [4/5]

StdString Diarkis::operator+ ( const StdString lhs,
const char  rhs 
)
inline
Here is the call graph for this function:

◆ operator+() [5/5]

StdString Diarkis::operator+ ( const char  lhs,
const StdString rhs 
)
inline
Here is the call graph for this function:

◆ to_string() [1/9]

StdString Diarkis::to_string ( int  value)
inline

◆ to_string() [2/9]

StdString Diarkis::to_string ( long  value)
inline

◆ to_string() [3/9]

StdString Diarkis::to_string ( long long  value)
inline

◆ to_string() [4/9]

StdString Diarkis::to_string ( unsigned  value)
inline

◆ to_string() [5/9]

StdString Diarkis::to_string ( unsigned long  value)
inline

◆ to_string() [6/9]

StdString Diarkis::to_string ( unsigned long long  value)
inline

◆ to_string() [7/9]

StdString Diarkis::to_string ( float  value)
inline

◆ to_string() [8/9]

StdString Diarkis::to_string ( double  value)
inline

◆ to_string() [9/9]

StdString Diarkis::to_string ( long double  value)
inline

◆ ParseErrStruct()

bool DIARKIS_EXPORT Diarkis::ParseErrStruct ( uint8_t  status,
const Diarkis::StdVector< uint8_t > &  payload,
uint16_t &  errCode,
Diarkis::StdString errString 
)

Parse payload of the error struct data, which is received in the response handlers.