|
| NamedPipe (Context *context) |
| Construct.
|
|
| NamedPipe (Context *context, const String &name, bool isServer) |
| Construct and open in either server or client mode.
|
|
| ~NamedPipe () override |
| Destruct and close.
|
|
i32 | Read (void *dest, i32 size) override |
| Read bytes from the pipe without blocking if there is less data available. Return number of bytes actually read. More...
|
|
i64 | Seek (i64 position) override |
| Set position. No-op for pipes. More...
|
|
i32 | Write (const void *data, i32 size) override |
| Write bytes to the pipe. Return number of bytes actually written. More...
|
|
bool | IsEof () const override |
| Return whether pipe has no data available. More...
|
|
void | SetName (const String &name) override |
| Not supported. More...
|
|
bool | Open (const String &name, bool isServer) |
| Open the pipe in either server or client mode. If already open, the existing pipe is closed. For a client end to open successfully the server end must already to be open. Return true if successful.
|
|
void | Close () |
| Close the pipe. Note that once a client has disconnected, the server needs to close and reopen the pipe so that another client can connect. At least on Windows this is not possible to detect automatically, so the communication protocol should include a "bye" message to handle this situation.
|
|
bool | IsOpen () const |
| Return whether is open.
|
|
bool | IsServer () const |
| Return whether is in server mode.
|
|
| Object (Context *context) |
| Construct.
|
|
| ~Object () override |
| Destruct. Clean up self from event sender & receiver structures.
|
|
virtual StringHash | GetType () const =0 |
| Return type hash. More...
|
|
virtual const String & | GetTypeName () const =0 |
| Return type name. More...
|
|
virtual const TypeInfo * | GetTypeInfo () const =0 |
| Return type info.
|
|
virtual void | OnEvent (Object *sender, StringHash eventType, VariantMap &eventData) |
| Handle event.
|
|
bool | IsInstanceOf (StringHash type) const |
| Check current instance is type of specified type.
|
|
bool | IsInstanceOf (const TypeInfo *typeInfo) const |
| Check current instance is type of specified type.
|
|
template<typename T > |
bool | IsInstanceOf () const |
| Check current instance is type of specified class.
|
|
template<typename T > |
T * | Cast () |
| Cast the object to specified most derived class.
|
|
template<typename T > |
const T * | Cast () const |
| Cast the object to specified most derived class.
|
|
void | SubscribeToEvent (StringHash eventType, EventHandler *handler) |
| Subscribe to an event that can be sent by any sender.
|
|
void | SubscribeToEvent (Object *sender, StringHash eventType, EventHandler *handler) |
| Subscribe to a specific sender's event.
|
|
void | SubscribeToEvent (StringHash eventType, const std::function< void(StringHash, VariantMap &)> &function, void *userData=nullptr) |
| Subscribe to an event that can be sent by any sender.
|
|
void | SubscribeToEvent (Object *sender, StringHash eventType, const std::function< void(StringHash, VariantMap &)> &function, void *userData=nullptr) |
| Subscribe to a specific sender's event.
|
|
void | UnsubscribeFromEvent (StringHash eventType) |
| Unsubscribe from an event.
|
|
void | UnsubscribeFromEvent (Object *sender, StringHash eventType) |
| Unsubscribe from a specific sender's event.
|
|
void | UnsubscribeFromEvents (Object *sender) |
| Unsubscribe from a specific sender's events.
|
|
void | UnsubscribeFromAllEvents () |
| Unsubscribe from all events.
|
|
void | UnsubscribeFromAllEventsExcept (const Vector< StringHash > &exceptions, bool onlyUserData) |
| Unsubscribe from all events except those listed, and optionally only those with userdata (script registered events).
|
|
void | SendEvent (StringHash eventType) |
| Send event to all subscribers.
|
|
void | SendEvent (StringHash eventType, VariantMap &eventData) |
| Send event with parameters to all subscribers.
|
|
VariantMap & | GetEventDataMap () const |
| Return a preallocated map for event data. Used for optimization to avoid constant re-allocation of event data maps.
|
|
template<typename... Args> |
void | SendEvent (StringHash eventType, Args... args) |
| Send event with variadic parameter pairs to all subscribers. The parameter pairs is a list of paramID and paramValue separated by comma, one pair after another.
|
|
Context * | GetContext () const |
| Return execution context.
|
|
const Variant & | GetGlobalVar (StringHash key) const |
| Return global variable based on key.
|
|
const VariantMap & | GetGlobalVars () const |
| Return all global variables.
|
|
void | SetGlobalVar (StringHash key, const Variant &value) |
| Set global variable with the respective key and value.
|
|
Object * | GetSubsystem (StringHash type) const |
| Return subsystem by type.
|
|
Object * | GetEventSender () const |
| Return active event sender. Null outside event handling.
|
|
EventHandler * | GetEventHandler () const |
| Return active event handler. Null outside event handling.
|
|
bool | HasSubscribedToEvent (StringHash eventType) const |
| Return whether has subscribed to an event without specific sender.
|
|
bool | HasSubscribedToEvent (Object *sender, StringHash eventType) const |
| Return whether has subscribed to a specific sender's event.
|
|
bool | HasEventHandlers () const |
| Return whether has subscribed to any event.
|
|
template<class T > |
T * | GetSubsystem () const |
| Template version of returning a subsystem.
|
|
const String & | GetCategory () const |
| Return object category. Categories are (optionally) registered along with the object factory. Return an empty string if the object category is not registered.
|
|
void | SetBlockEvents (bool block) |
| Block object from sending and receiving events.
|
|
bool | GetBlockEvents () const |
| Return sending and receiving events blocking status.
|
|
| RefCounted () |
| Construct. Allocate the reference count structure and set an initial self weak reference.
|
|
virtual | ~RefCounted () |
| Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist.
|
|
| RefCounted (const RefCounted &rhs)=delete |
| Prevent copy construction.
|
|
RefCounted & | operator= (const RefCounted &rhs)=delete |
| Prevent assignment.
|
|
void | AddRef () |
| Increment reference count. Can also be called outside of a SharedPtr for traditional reference counting.
|
|
void | ReleaseRef () |
| Decrement reference count and delete self if no more references. Can also be called outside of a SharedPtr for traditional reference counting.
|
|
int | Refs () const |
| Return reference count.
|
|
int | WeakRefs () const |
| Return weak reference count.
|
|
RefCount * | RefCountPtr () |
| Return pointer to the reference count structure.
|
|
| AbstractFile () |
| Construct.
|
|
| AbstractFile (i64 size) |
| Construct.
|
|
| ~AbstractFile () override=default |
| Destruct.
|
|
virtual void | SetName (const String &name) |
| Change the file name. Used by the resource system. More...
|
|
const String & | GetName () const override |
| Return the file name. More...
|
|
| Deserializer () |
| Construct with zero size.
|
|
| Deserializer (i64 size) |
| Construct with defined size.
|
|
virtual | ~Deserializer () |
| Destruct.
|
|
virtual i32 | Read (void *dest, i32 size)=0 |
| Read bytes from the stream. Return number of bytes actually read. More...
|
|
virtual i64 | Seek (i64 position)=0 |
| Set position from the beginning of the stream. Return actual new position. More...
|
|
virtual const String & | GetName () const |
| Return name of the stream. More...
|
|
virtual hash32 | GetChecksum () |
| Return a checksum if applicable. More...
|
|
virtual bool | IsEof () const |
| Return whether the end of stream has been reached. More...
|
|
i64 | SeekRelative (i64 delta) |
| Set position relative to current position. Return actual new position.
|
|
i64 | GetPosition () const |
| Return current position.
|
|
i64 | Tell () const |
| Return current position.
|
|
i64 | GetSize () const |
| Return size.
|
|
i64 | ReadI64 () |
| Read a 64-bit integer.
|
|
i32 | ReadI32 () |
| Read a 32-bit integer.
|
|
i16 | ReadI16 () |
| Read a 16-bit integer.
|
|
i8 | ReadI8 () |
| Read an 8-bit integer.
|
|
u64 | ReadU64 () |
| Read a 64-bit unsigned integer.
|
|
u32 | ReadU32 () |
| Read a 32-bit unsigned integer.
|
|
u16 | ReadU16 () |
| Read a 16-bit unsigned integer.
|
|
u8 | ReadU8 () |
| Read an 8-bit unsigned integer.
|
|
byte | ReadByte () |
| Read an 8-bit unsigned integer.
|
|
bool | ReadBool () |
| Read a bool.
|
|
float | ReadFloat () |
| Read a float.
|
|
double | ReadDouble () |
| Read a double.
|
|
IntRect | ReadIntRect () |
| Read an IntRect.
|
|
IntVector2 | ReadIntVector2 () |
| Read an IntVector2.
|
|
IntVector3 | ReadIntVector3 () |
| Read an IntVector3.
|
|
Rect | ReadRect () |
| Read a Rect.
|
|
Vector2 | ReadVector2 () |
| Read a Vector2.
|
|
Vector3 | ReadVector3 () |
| Read a Vector3.
|
|
Vector3 | ReadPackedVector3 (float maxAbsCoord) |
| Read a Vector3 packed into 3 x 16 bits with the specified maximum absolute range.
|
|
Vector4 | ReadVector4 () |
| Read a Vector4.
|
|
Quaternion | ReadQuaternion () |
| Read a quaternion.
|
|
Quaternion | ReadPackedQuaternion () |
| Read a quaternion with each component packed in 16 bits.
|
|
Matrix3 | ReadMatrix3 () |
| Read a Matrix3.
|
|
Matrix3x4 | ReadMatrix3x4 () |
| Read a Matrix3x4.
|
|
Matrix4 | ReadMatrix4 () |
| Read a Matrix4.
|
|
Color | ReadColor () |
| Read a color.
|
|
BoundingBox | ReadBoundingBox () |
| Read a bounding box.
|
|
String | ReadString () |
| Read a null-terminated string.
|
|
String | ReadFileID () |
| Read a four-letter file ID.
|
|
StringHash | ReadStringHash () |
| Read a 32-bit StringHash.
|
|
Vector< byte > | ReadBuffer () |
| Read a buffer with size encoded as VLE.
|
|
ResourceRef | ReadResourceRef () |
| Read a resource reference.
|
|
ResourceRefList | ReadResourceRefList () |
| Read a resource reference list.
|
|
Variant | ReadVariant () |
| Read a variant.
|
|
Variant | ReadVariant (VariantType type) |
| Read a variant whose type is already known.
|
|
VariantVector | ReadVariantVector () |
| Read a variant vector.
|
|
StringVector | ReadStringVector () |
| Read a string vector.
|
|
VariantMap | ReadVariantMap () |
| Read a variant map.
|
|
unsigned | ReadVLE () |
| Read a variable-length encoded unsigned integer, which can use 29 bits maximum.
|
|
id32 | ReadNetID () |
| Read a 24-bit network object ID.
|
|
String | ReadLine () |
| Read a text line.
|
|
virtual | ~Serializer () |
| Destruct.
|
|
virtual i32 | Write (const void *data, i32 size)=0 |
| Write bytes to the stream. Return number of bytes actually written. More...
|
|
bool | WriteI64 (i64 value) |
| Write a 64-bit integer.
|
|
bool | WriteI32 (i32 value) |
| Write a 32-bit integer.
|
|
bool | WriteI16 (i16 value) |
| Write a 16-bit integer.
|
|
bool | WriteI8 (i8 value) |
| Write an 8-bit integer.
|
|
bool | WriteU64 (u64 value) |
| Write a 64-bit unsigned integer.
|
|
bool | WriteU32 (u32 value) |
| Write a 32-bit unsigned integer.
|
|
bool | WriteU16 (u16 value) |
| Write a 16-bit unsigned integer.
|
|
bool | WriteU8 (u8 value) |
| Write an 8-bit unsigned integer.
|
|
bool | WriteByte (byte value) |
| Write an byte.
|
|
bool | WriteBool (bool value) |
| Write a bool.
|
|
bool | WriteFloat (float value) |
| Write a float.
|
|
bool | WriteDouble (double value) |
| Write a double.
|
|
bool | WriteIntRect (const IntRect &value) |
| Write an IntRect.
|
|
bool | WriteIntVector2 (const IntVector2 &value) |
| Write an IntVector2.
|
|
bool | WriteIntVector3 (const IntVector3 &value) |
| Write an IntVector3.
|
|
bool | WriteRect (const Rect &value) |
| Write a Rect.
|
|
bool | WriteVector2 (const Vector2 &value) |
| Write a Vector2.
|
|
bool | WriteVector3 (const Vector3 &value) |
| Write a Vector3.
|
|
bool | WritePackedVector3 (const Vector3 &value, float maxAbsCoord) |
| Write a Vector3 packed into 3 x 16 bits with the specified maximum absolute range.
|
|
bool | WriteVector4 (const Vector4 &value) |
| Write a Vector4.
|
|
bool | WriteQuaternion (const Quaternion &value) |
| Write a quaternion.
|
|
bool | WritePackedQuaternion (const Quaternion &value) |
| Write a quaternion with each component packed in 16 bits.
|
|
bool | WriteMatrix3 (const Matrix3 &value) |
| Write a Matrix3.
|
|
bool | WriteMatrix3x4 (const Matrix3x4 &value) |
| Write a Matrix3x4.
|
|
bool | WriteMatrix4 (const Matrix4 &value) |
| Write a Matrix4.
|
|
bool | WriteColor (const Color &value) |
| Write a color.
|
|
bool | WriteBoundingBox (const BoundingBox &value) |
| Write a bounding box.
|
|
bool | WriteString (const String &value) |
| Write a null-terminated string.
|
|
bool | WriteFileID (const String &value) |
| Write a four-letter file ID. If the string is not long enough, spaces will be appended.
|
|
bool | WriteStringHash (const StringHash &value) |
| Write a 32-bit StringHash.
|
|
bool | WriteBuffer (const Vector< byte > &value) |
| Write a buffer, with size encoded as VLE.
|
|
bool | WriteResourceRef (const ResourceRef &value) |
| Write a resource reference.
|
|
bool | WriteResourceRefList (const ResourceRefList &value) |
| Write a resource reference list.
|
|
bool | WriteVariant (const Variant &value) |
| Write a variant.
|
|
bool | WriteVariantData (const Variant &value) |
| Write a variant without the type information.
|
|
bool | WriteVariantVector (const VariantVector &value) |
| Write a variant vector.
|
|
bool | WriteStringVector (const StringVector &value) |
| Write a variant vector.
|
|
bool | WriteVariantMap (const VariantMap &value) |
| Write a variant map.
|
|
bool | WriteVLE (unsigned value) |
| Write a variable-length encoded unsigned integer, which can use 29 bits maximum.
|
|
bool | WriteNetID (id32 value) |
| Write a 24-bit network object ID.
|
|
bool | WriteLine (const String &value) |
| Write a text line. Char codes 13 & 10 will be automatically appended.
|
|