Zen API

- Home
- Help Topics
- Types by Category
- All Types
- Files

All Classes Files Functions Variables Typedefs Macros Groups Pages
kDynamicLib.h
Go to the documentation of this file.
1 /**
2 * @file kDynamicLib.h
3 * @brief Declares the kDynamicLib class.
4 *
5 * @internal
6 * Copyright (C) 2013-2014 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 #ifndef K_API_DYNAMIC_LIB_H
11 #define K_API_DYNAMIC_LIB_H
12
13 #include <kApi/kApiDef.h>
14
15 kBeginHeader()
16
17 /**
18 * @class kDynamicLib
19 * @extends kObject
20 * @ingroup kApi-Utils
21 * @brief Represents a dynamically loaded library.
22 *
23 * This class relies on OS support for dynamic loading, and is only available on platforms that
24 * provide underlying support.
25 */
26 //typedef kObject kDynamicLib; --forward-declared in kApiDef.x.h
27
28 /**
29 * Constructs a kDynamicLib object.
30 *
31 * @public @memberof kDynamicLib
32 * @param library Destination for the constructed object handle.
33 * @param path Path to the dynamic library.
34 * @param allocator Memory allocator (or kNULL for default).
35 * @return Operation status.
36 */
37 kFx(kStatus) kDynamicLib_Construct(kDynamicLib* library, const kChar* path, kAlloc allocator);
38
39 /**
40 * Resolves a function pointer by name from the dynamic library.
41 *
42 * @public @memberof kDynamicLib
43 * @param library Dynamic library object.
44 * @param name Function name.
45 * @param function Receives function pointer.
46 * @return Operation status.
47 */
48 kFx(kStatus) kDynamicLib_Function(kDynamicLib library, const kChar* name, kFunction* function);
49
50 kEndHeader()
51
52 #include <kApi/Utils/kDynamicLib.x.h>
53
54 #endif
kAlloc
Abstract base class for memory allocator types.
kChar
Represents a single unit (byte) in a UTF-8 character.
kApiDef.h
Essential API declarations.
kFunction
void(kCall * kFunction)()
Generic pointer to function.
Definition: kApiDef.h:28
kDynamicLib::kDynamicLib_Function
kStatus kDynamicLib_Function(kDynamicLib library, const kChar *name, kFunction *function)
Resolves a function pointer by name from the dynamic library.
kStatus
Represents an enumeration of error codes.
kDynamicLib::kDynamicLib_Construct
kStatus kDynamicLib_Construct(kDynamicLib *library, const kChar *path, kAlloc allocator)
Constructs a kDynamicLib object.
kDynamicLib
Represents a dynamically loaded library.