
All checks were successful
Build / Build (push) Successful in 39s
This commit significantly enhances the `README.md` file, providing comprehensive documentation for the ArmaDragonflyClient. Key changes: * **Detailed Function Categories:** Categorized functions for better organization (Core, Basic Data Operations, Hash Operations, List Operations). * **Usage Examples:** Added clear and concise usage examples for basic operations, hash operations (context and ID-specific), and list operations. * **Function Documentation Structure:** Outlined the structure for individual function documentation. * **License Information:** Updated the license information.
209 lines
10 KiB
XML
209 lines
10 KiB
XML
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
|
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_dir_6b1f4820e2481aa5a1ea9b2275f196d9" xml:lang="en-US">
|
|
<title>G:/ids/dragonfly/docs Directory Reference</title>
|
|
<indexterm><primary>G:/ids/dragonfly/docs Directory Reference</primary></indexterm>
|
|
<simplesect>
|
|
<title>Directories </title>
|
|
<itemizedlist>
|
|
<listitem><para>directory <link linkend="_dir_71f12be5768ca2af9c9f300d019944af">basic</link></para>
|
|
</listitem>
|
|
<listitem><para>directory <link linkend="_dir_10eb6422e80bd721a9a7af022f58c68b">core</link></para>
|
|
</listitem>
|
|
<listitem><para>directory <link linkend="_dir_1d1eabba2c636e67297dc8cee9bc9944">hash</link></para>
|
|
</listitem>
|
|
<listitem><para>directory <link linkend="_dir_72c6efb7383bf0530aa073c1e7428252">list</link></para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</simplesect>
|
|
<section>
|
|
<title>Detailed Description</title>
|
|
|
|
<para>This documentation provides details on all functions available in <computeroutput>ArmaDragonflyClient</computeroutput>. These functions allow you to interact with the in-memory database system for Arma 3.</para>
|
|
<section xml:id="_README.md_1autotoc_md345">
|
|
<title>Function Categories</title>
|
|
<para>The functions are categorized by their purpose:</para>
|
|
<section xml:id="_README.md_1autotoc_md346">
|
|
<title>Core Functions</title>
|
|
<para><itemizedlist>
|
|
<listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2core_2init">init</link> - Initialize the database system</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2core_2handler">handler</link> - Handle callbacks from the extension</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2core_2process_queue">processQueue</link> - Process queued database operations</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2core_2scheduler">scheduler</link> - Schedule database operations</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2core_2add_task">addTask</link> - Add a task to the scheduler</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2core_2print_addon_name">printAddonName</link> - Print the addon name</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2core_2test">test</link> - Test the database connection</para>
|
|
</listitem></itemizedlist>
|
|
</para>
|
|
</section>
|
|
<section xml:id="_README.md_1autotoc_md347">
|
|
<title>Basic Data Operations</title>
|
|
<para><itemizedlist>
|
|
<listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2basic_2get">get</link> - Get a value from the database</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2basic_2set">set</link> - Set a value in the database</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2basic_2delete">delete</link> - Delete a value from the database</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2basic_2save">save</link> - Save the database to disk</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2basic_2fetch">fetch</link> - Fetch a value from the database</para>
|
|
</listitem></itemizedlist>
|
|
</para>
|
|
</section>
|
|
<section xml:id="_README.md_1autotoc_md348">
|
|
<title>Hash Operations</title>
|
|
<para><itemizedlist>
|
|
<listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2hash_2hash_get">hashGet</link> - Get a field from a hash</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2hash_2hash_get_all">hashGetAll</link> - Get all fields from a hash</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2hash_2hash_get_all_id">hashGetAllId</link> - Get all fields from a hash for a specific ID</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2hash_2hash_get_id">hashGetId</link> - Get a field from a hash for a specific ID</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2hash_2hash_set">hashSet</link> - Set a field in a hash</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2hash_2hash_set_bulk">hashSetBulk</link> - Set multiple fields in a hash in one operation</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2hash_2hash_set_id">hashSetId</link> - Set a field in a hash for a specific ID</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2hash_2hash_set_id_bulk">hashSetIdBulk</link> - Set multiple fields in a hash for a specific ID in one operation</para>
|
|
</listitem></itemizedlist>
|
|
</para>
|
|
</section>
|
|
<section xml:id="_README.md_1autotoc_md349">
|
|
<title>List Operations</title>
|
|
<para><itemizedlist>
|
|
<listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2list_2list_add">listAdd</link> - Add an item to a list</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2list_2list_get">listGet</link> - Get items from a list</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2list_2list_load">listLoad</link> - Load a list from the database</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2list_2list_remove">listRemove</link> - Remove an item from a list</para>
|
|
</listitem><listitem>
|
|
<para><link linkend="_md__g_1_2ids_2dragonfly_2docs_2list_2list_set">listSet</link> - Set an item in a list</para>
|
|
</listitem></itemizedlist>
|
|
</para>
|
|
</section>
|
|
</section>
|
|
<section xml:id="_README.md_1autotoc_md350">
|
|
<title>Usage Examples</title><section xml:id="_README.md_1autotoc_md351">
|
|
<title>Basic Usage</title>
|
|
<para><literallayout><computeroutput>// Initialize the database
|
|
[] call dragonfly_db_fnc_init;
|
|
|
|
// Set a value
|
|
["myKey", [myValue]] call dragonfly_db_fnc_set;
|
|
|
|
// Get a value
|
|
["myKey", "myFunction"] call dragonfly_db_fnc_get;
|
|
|
|
// Delete a key
|
|
["myKey"] call dragonfly_db_fnc_delete;
|
|
</computeroutput></literallayout></para>
|
|
</section>
|
|
<section xml:id="_README.md_1autotoc_md352">
|
|
<title>Hash Operations</title>
|
|
<para><literallayout><computeroutput>// Set a hash field (context mode)
|
|
["myField", [myValue]] call dragonfly_db_fnc_hashSet;
|
|
|
|
// Get a hash field (context mode)
|
|
["myField", "myFunction"] call dragonfly_db_fnc_hashGet;
|
|
|
|
// Get all hash fields (context mode)
|
|
["myFunction"] call dragonfly_db_fnc_hashGetAll;
|
|
|
|
// Set multiple hash fields (context mode)
|
|
[[
|
|
    "loadout", [getUnitLoadout player],
|
|
    "position", [getPosASL player],
|
|
    "direction", [getDir player],
|
|
    "stance", [stance player]
|
|
]] call dragonfly_db_fnc_hashSetBulk;
|
|
|
|
// Remove a hash field (context mode)
|
|
["myField"] call dragonfly_db_fnc_hashRemove;
|
|
|
|
// Delete a hash table (context mode)
|
|
[] call dragonfly_db_fnc_hashDelete;
|
|
</computeroutput></literallayout> <literallayout><computeroutput>// Set a hash field for specific ID
|
|
["myHash", "myField", [myValue]] call dragonfly_db_fnc_hashSetId;
|
|
|
|
// Get a hash field for specific ID
|
|
["myHash", "myField", "myFunction"] call dragonfly_db_fnc_hashGetId;
|
|
|
|
// Get all hash fields for specific ID
|
|
["myHash"] call dragonfly_db_fnc_hashGetAllId;
|
|
|
|
// Set multiple hash fields for specific ID
|
|
[[
|
|
    getPlayerUID player,
|
|
    "loadout", [getUnitLoadout player],
|
|
    "position", [getPosASL player],
|
|
    "direction", [getDir player],
|
|
    "stance", [stance player]
|
|
]] call dragonfly_db_fnc_hashSetIdBulk;
|
|
|
|
// Remove a hash field for specific ID
|
|
["myHash", "myField"] call dragonfly_db_fnc_hashRemoveId;
|
|
|
|
// Delete a hash table for specific ID
|
|
["myHash"] call dragonfly_db_fnc_hashDeleteId;
|
|
</computeroutput></literallayout></para>
|
|
</section>
|
|
<section xml:id="_README.md_1autotoc_md353">
|
|
<title>List Operations</title>
|
|
<para><literallayout><computeroutput>// Add an item to a list
|
|
["myList", ["myItem"]] call dragonfly_db_fnc_listAdd;
|
|
|
|
// Set an item from a list
|
|
["myList", 0, [myNewValue]] call dragonfly_db_fnc_listSet;
|
|
|
|
// Get an item from a list
|
|
["myList", 0, "myFunction"] call dragonfly_db_fnc_listGet;
|
|
|
|
// Get items from a list
|
|
["myList", "myFunction"] call dragonfly_db_fnc_listLoad;
|
|
|
|
// Remove an item from a list
|
|
["myList", 0] call dragonfly_db_fnc_listRemove;
|
|
|
|
// Delete a list
|
|
["myList"] call dragonfly_db_fnc_listDelete;
|
|
</computeroutput></literallayout></para>
|
|
</section>
|
|
</section>
|
|
<section xml:id="_README.md_1autotoc_md354">
|
|
<title>Function Documentation Structure</title>
|
|
<para>Each function documentation includes:<itemizedlist>
|
|
<listitem>
|
|
<para>Function name and purpose</para>
|
|
</listitem><listitem>
|
|
<para>Parameters</para>
|
|
</listitem><listitem>
|
|
<para>Return value</para>
|
|
</listitem><listitem>
|
|
<para>Examples</para>
|
|
</listitem><listitem>
|
|
<para>Notes and warnings</para>
|
|
</listitem></itemizedlist>
|
|
</para>
|
|
</section>
|
|
<section xml:id="_README.md_1autotoc_md355">
|
|
<title>License</title>
|
|
<para>This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit <link xlink:href="https://creativecommons.org/licenses/by-nc-sa/4.0/">https://creativecommons.org/licenses/by-nc-sa/4.0/</link> or send a letter to Creative Commons, <?linebreak?>PO Box 1866, Mountain View, CA 94042 </para>
|
|
</section>
|
|
</section>
|
|
</section>
|