From 81ba199098b6e01ee332eb9e1dbb1f4dae53de2c Mon Sep 17 00:00:00 2001
From: Jayesh Badwaik <jayesh@badwaik.in>
Date: Thu, 26 Nov 2020 22:40:24 +0530
Subject: [PATCH] [wip]

---
 cmake/configure/doxyfile.in   |  2 +-
 doc/doxygen/index.md          | 13 ++++++++++++-
 src/include/radle/inventory.h | 17 +++++++++++++++--
 3 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/cmake/configure/doxyfile.in b/cmake/configure/doxyfile.in
index a6aa8f0..d3bf736 100644
--- a/cmake/configure/doxyfile.in
+++ b/cmake/configure/doxyfile.in
@@ -10,7 +10,7 @@ FILE_PATTERNS          = *.h
 RECURSIVE              = YES
 QUIET                  = YES
 USE_MDFILE_AS_MAINPAGE = @doxy_main_page@
-EXTRACT_ALL						 = YES
+EXTRACT_ALL            = YES
 EXTRACT_STATIC         = YES
 EXTRACT_LOCAL_CLASSES  = YES
 TEMPLATE_RELATIONS     = YES
diff --git a/doc/doxygen/index.md b/doc/doxygen/index.md
index 3e6f3d1..7e76ed2 100644
--- a/doc/doxygen/index.md
+++ b/doc/doxygen/index.md
@@ -1 +1,12 @@
-radle is a parser for resource description files.
+# radle
+
+A resource description language (RDL) file for Maestro is a
+
+The user facing interface for radle consists of the following data types and functions:
+
+
+
+The structure of [inventory](#inventory) [radle inventory](@ref radle_inventory)
+
+<a name="inventory"></a>
+# Inventory
diff --git a/src/include/radle/inventory.h b/src/include/radle/inventory.h
index 5a84a2f..4b790f8 100644
--- a/src/include/radle/inventory.h
+++ b/src/include/radle/inventory.h
@@ -19,9 +19,22 @@ typedef struct {
   radle_resource** resource_ptr_array;
 } radle_inventory;
 
-/// Initialize Inventory to A Sane State
+/// Initialize radle_inventory to an empty state
+///
+/// @param inventory_ptr Pointer to the inventory to be initialized
+///
+/// This function
+/// - sets `inventory_ptr->nresource=0`
+/// - sets `inventory_ptr->resource_ptr_array=NULL`
+///
+/// Note: This function should only be used to initialize an uninitialized
+/// radle_inventory object. This function does not destruct the previous
+/// object pointed to by the `resource_ptr_array`, and hence, using them on
+/// already initialized `radle_inventory` will lead to memory leaks.
 void radle_initialize_inventory(radle_inventory* inventory_ptr);
 
-/// Delete the Inventory Correctly
+/// Delete the Contents of the Inventory
+/// @param inventory_ptr Pointer to the inventory whose contents are to be
+/// deleted.
 void radle_delete_inventory(radle_inventory* inventory_ptr);
 #endif // RADLE_INVENTORY_H
-- 
GitLab