Record Sagui
Hierarchy
Fields
Properties
Unit
BrookUtility
Declaration
type Sagui = record
Description
Global Sagui
object containing general purpose functions.
Overview
Methods
|
class function Version: Cardinal; overload; static; |
|
class function Version(out AMajor, AMinor: Byte; out APatch: SmallInt): Cardinal; overload; static; |
|
class function VersionStr: string; static; |
|
class function Malloc(ASize: NativeUInt): Pointer; static; |
|
class function Alloc(ASize: NativeUInt): Pointer; static; |
|
class function Realloc(APointer: Pointer; ASize: NativeUInt): Pointer; static; |
|
class procedure Free(APointer: Pointer); static; |
|
class procedure StrError(AErrorNum: Integer; out AErrorMsg: string; AErrorLen: Integer); overload; static; inline; |
|
class function StrError(AErrorNum: Integer): string; overload; static; |
|
class function IsPost(const AMethod: string): Boolean; static; |
|
class function ExtractEntryPoint(const APath: string): string; static; |
|
class function TmpDir: string; static; |
|
class function EOR(AError: Boolean): NativeInt; static; |
|
class function IP(ASocket: Pointer): string; static; |
Description
Methods
|
class function Version: Cardinal; overload; static; |
Returns the library version number.
Returns
Library version packed into a single integer. |
|
class function Version(out AMajor, AMinor: Byte; out APatch: SmallInt): Cardinal; overload; static; |
Returns the library version number.
Parameters
- AMajor[out]
- Major number.
- AMinor[out]
- Minor number.
- APatch[out]
- Patch number.
Returns
Library version packed into a single integer. |
|
class function VersionStr: string; static; |
Returns the library version number as string in the format <MAJOR>.<MINOR>.<PATCH> .
Returns
Library version packed into a static string. |
|
class function Malloc(ASize: NativeUInt): Pointer; static; |
Allocates a new memory space.
Parameters
- ASize[in]
- Memory size to be allocated.
Returns
Pointer of the allocated zero-initialized memory.
Returns values:
nil
If size is 0 or no memory space.
|
|
class function Alloc(ASize: NativeUInt): Pointer; static; |
Allocates a new zero-initialized memory space.
Parameters
- ASize[in]
- Memory size to be allocated.
Returns
Pointer of the allocated zero-initialized memory.
Returns values:
nil
If size is 0 or no memory space.
|
|
class function Realloc(APointer: Pointer; ASize: NativeUInt): Pointer; static; |
Reallocates an existing memory block.
Parameters
- APointer[in]
- Pointer of the memory to be reallocated.
- ASize[in]
- Memory size to be allocated.
Returns
Pointer of the reallocated memory. |
|
class procedure Free(APointer: Pointer); static; |
Frees a memory space previous allocated by Sagui.Malloc , Sagui.Alloc or Sagui.Realloc .
Parameters
- APointer[in]
- Pointer of the memory to be freed.
|
|
class procedure StrError(AErrorNum: Integer; out AErrorMsg: string; AErrorLen: Integer); overload; static; inline; |
Returns string describing an error number.
Parameters
- AErrorNum[in]
- Error number.
- AErrorMsg[out]
- Referenced string to store the error message.
- AErrorLen[in]
- Length of the error message.
|
|
class function StrError(AErrorNum: Integer): string; overload; static; |
Returns string describing an error number.
Parameters
- AErrorNum[in]
- Error number.
Returns
Static string describing the error. |
|
class function IsPost(const AMethod: string): Boolean; static; |
Checks if a string is an HTTP post method.
Parameters
- AMethod[in]
- HTTP verb.
Returns
True if given method is POST, PUT, DELETE or OPTIONS. |
|
class function ExtractEntryPoint(const APath: string): string; static; |
Extracts the entry-point of a path or resource. For example, given a path /api1/customer , the part considered as entry-point is /api1 .
Parameters
- APath[in]
- Path as static string.
Returns
Entry-point as static string. |
|
class function TmpDir: string; static; |
Returns the system temporary directory.
Returns
Temporary directory as static string. |
|
class function EOR(AError: Boolean): NativeInt; static; |
Indicates the end-of-read processed in TBrookHTTPResponse.SendStream .
Parameters
- AError[in]
True to return a value indicating a stream reading error.
Returns
Value to end a stream reading. |
|
class function IP(ASocket: Pointer): string; static; |
Obtains the IP of a socket handle into a string.
Parameters
- ASocket[in]
- Socket handle.
Returns
Formatted IP into a string. |
Generated by PasDoc 0.16.0.