a8/a8/types.h
2018-08-26 20:34:01 +08:00

44 lines
779 B
C++

#ifndef A8_TYPES_H
#define A8_TYPES_H
namespace a8
{
namespace reflect
{
class Class;
}
struct ReflectibleObject
{
a8::reflect::Class *metaclass = nullptr;
};
struct IReflectible
{
virtual a8::ReflectibleObject* GetReflectibleObject() const = 0;
virtual void set(a8::ReflectibleObject* ) = 0;
};
template<class T>
struct DataLink
{
T* data = nullptr;
};
typedef long long tick_t;
struct SendQueueNode
{
char* buff = nullptr;
unsigned int bufflen = 0;
unsigned int sent_bytes = 0;
SendQueueNode* next = nullptr;
};
const int INVALID_FD = -1;
const int INVALID_SOCKET = -1;
const int INVALID_SOCKET_HANDLE = 0;
};
#endif