279abdd723
This commit significantly expands the patient simulation by adding models for the full digestive and urinary systems, as well as the spleen and spinal cord. This builds on the polymorphic organ framework by adding 9 new organ classes: - Kidneys - Bladder - Stomach - Intestines - Gallbladder - Pancreas - Esophagus - Spleen - SpinalCord Each new organ has its own header, a source file with simplified simulation logic for its unique physiological properties, and is integrated into the main patient model and simulation loop. The build system and example application have been updated to include and demonstrate this new, more comprehensive set of organs.
62 lines
1.4 KiB
C++
62 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
// Define MEDICAL_LIB_EXPORT for exporting symbols from the DLL
|
|
#if defined(_WIN32)
|
|
#if defined(MEDICAL_LIB_EXPORT)
|
|
#define MEDICAL_LIB_API __declspec(dllexport)
|
|
#else
|
|
#define MEDICAL_LIB_API __declspec(dllimport)
|
|
#endif
|
|
#else
|
|
#define MEDICAL_LIB_API
|
|
#endif
|
|
|
|
/**
|
|
* @brief Abstract base class for all organ types.
|
|
*/
|
|
class MEDICAL_LIB_API Organ {
|
|
public:
|
|
/**
|
|
* @brief Constructor for the Organ class.
|
|
* @param id The ID of the organ.
|
|
* @param type The type of the organ as a string.
|
|
*/
|
|
Organ(int id, const std::string& type);
|
|
|
|
/**
|
|
* @brief Virtual destructor.
|
|
*/
|
|
virtual ~Organ() = default;
|
|
|
|
/**
|
|
* @brief Pure virtual function to update the organ's state over time.
|
|
* @param deltaTime_s The time elapsed in seconds.
|
|
*/
|
|
virtual void update(double deltaTime_s) = 0;
|
|
|
|
/**
|
|
* @brief Pure virtual function to get a string summary of the organ's vitals.
|
|
* @return A string containing the organ's vital signs.
|
|
*/
|
|
virtual std::string getSummary() const = 0;
|
|
|
|
/**
|
|
* @brief Gets the organ ID.
|
|
* @return The organ ID.
|
|
*/
|
|
int getId() const;
|
|
|
|
/**
|
|
* @brief Gets the organ type.
|
|
* @return The organ type as a string.
|
|
*/
|
|
const std::string& getType() const;
|
|
|
|
protected:
|
|
int organId;
|
|
std::string organType;
|
|
};
|