Files
medicallib/include/MedicalLib/Kidneys.h
T
google-labs-jules[bot] 86488cec48 This commit performs a comprehensive documentation pass on the MedicalLib library, implementing a full documentation generation pipeline using Doxygen, Sphinx, and Breathe for Read the Docs.
Key changes include:

- **Added Comprehensive Doxygen Comments:**
  - Reviewed all header files in `include/MedicalLib/`.
  - Added Doxygen comments for public methods, structs, and their member variables to ensure full API coverage as per the project's coding standards.
  - Addressed all Doxygen warnings related to undocumented public members.

- **Restructured Sphinx Documentation:**
  - Created a new `docs/api/` directory to house detailed documentation for each component.
  - Replaced the single `api.rst` file with a well-organized structure using a `toctree`.
  - Created individual `.rst` pages for each organ, class, and major component.

- **Enabled Graph Generation:**
  - Configured Doxygen to generate class hierarchy and collaboration graphs.
  - Ensured the build process includes these graphs in the final documentation, providing visual context for the library's structure.

- **Verified Build Process:**
  - Installed all necessary dependencies (`doxygen`, `graphviz`, python packages).
  - Successfully ran the Doxygen and Sphinx build process to generate the final HTML documentation, ensuring all changes are correctly integrated.

This work results in a professional, navigable, and maintainable documentation site for the MedicalLib library.
2025-08-20 09:14:51 +00:00

69 lines
2.0 KiB
C++

#pragma once
#include "Organ.h"
#include <string>
#include <vector>
/**
* @brief Represents a functional unit of the kidney.
*/
struct Nephron {
std::string id; ///< The unique ID of the nephron.
double filtrationEfficiency; ///< The filtration efficiency, normalized [0.0, 1.0].
bool isDamaged; ///< True if the nephron has sustained damage.
};
/**
* @brief Represents the Kidneys, responsible for filtering blood and producing urine.
*/
class MEDICAL_LIB_API Kidneys : public Organ {
public:
/**
* @brief Constructor for the Kidneys class.
* @param id The ID of the organ.
*/
Kidneys(int id);
/**
* @brief Updates the kidneys' state over a time interval.
* @param patient A reference to the patient object.
* @param deltaTime_s The time elapsed in seconds.
*/
void update(Patient& patient, double deltaTime_s) override;
/**
* @brief Gets a string summary of the kidneys' state.
* @return A string containing the kidneys' state.
*/
std::string getSummary() const override;
// --- Getters for Renal Function ---
/** @brief Gets the Glomerular Filtration Rate (GFR) in mL/min. */
double getGfr() const;
/** @brief Gets the rate of urine production in mL/s. */
double getUrineOutputRate() const;
/** @brief Gets the simulated blood sodium level in mEq/L. */
double getBloodSodium() const;
/** @brief Gets the simulated blood potassium level in mEq/L. */
double getBloodPotassium() const;
/** @brief Gets the current rate of renin secretion. */
double getReninSecretionRate() const;
private:
// --- Physiological Parameters ---
double reninSecretionRate; // In ng/mL/hr
double gfr_mL_per_min;
double urineOutput_mL_per_s;
double bloodSodium_mEq_per_L;
double bloodPotassium_mEq_per_L;
// --- Anatomical Components ---
std::vector<Nephron> nephrons;
double totalFiltrationCapacity;
};