nutritionalprofile.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. class NutritionalProfile
  2. {
  3. float m_Energy;
  4. float m_WaterContent;
  5. float m_NutritionalIndex;
  6. float m_FullnessIndex;
  7. float m_Toxicity;
  8. int m_LiquidType;
  9. int m_Agents;
  10. string m_LiquidClassname;
  11. float m_Digestibility;
  12. float m_AgentsPerDigest;
  13. //! DEPRECATED - used as the structure with direct access
  14. void NutritionalProfile(float energy = 0.0, float water_content = 0.0, float nutritional_index = 0.0, float fullness_index = 0.0, float toxicity = 0.0, int agents = 0.0, float digestibility = 0.0)
  15. {
  16. m_Energy = energy;
  17. m_WaterContent = water_content;
  18. m_NutritionalIndex = nutritional_index;
  19. m_FullnessIndex = fullness_index;
  20. m_Toxicity = toxicity;
  21. m_Agents = agents;
  22. m_Digestibility = digestibility;
  23. }
  24. void MarkAsLiquid(int liquid_type, string classname)
  25. {
  26. m_LiquidType = liquid_type;
  27. m_LiquidClassname = classname;
  28. }
  29. int GetAgents()
  30. {
  31. return m_Agents;
  32. }
  33. int GetLiquidType()
  34. {
  35. return m_LiquidType;
  36. }
  37. string GetLiquidClassname()
  38. {
  39. return m_LiquidClassname;
  40. }
  41. bool IsLiquid()
  42. {
  43. return (m_LiquidType > 0);
  44. }
  45. float GetEnergy()
  46. {
  47. return m_Energy;
  48. }
  49. float GetWaterContent()
  50. {
  51. return m_WaterContent;
  52. }
  53. float GetNutritionalIndex()
  54. {
  55. return m_NutritionalIndex;
  56. }
  57. float GetFullnessIndex()
  58. {
  59. return m_FullnessIndex;
  60. }
  61. float GetToxicity()
  62. {
  63. return m_Toxicity;
  64. }
  65. float GetDigestibility()
  66. {
  67. return m_Digestibility;
  68. }
  69. }