00001 00024 #ifndef CALCULATEFUNCTIONS_H 00025 #define CALCULATEFUNCTIONS_H 00026 00027 #include "calculateregimeinterface.h" 00028 00030 class CalculateFunctions { 00031 public: 00032 inline CalculateFunctions() { _pluginAnnular = NULL; _pluginDispersed = NULL; _pluginStratified = NULL; _pluginSlug = NULL; 00033 _enabledAnnular = true; _enabledDispersed = true; _enabledStratified = true; _enabledSlug = true; }; 00034 00036 inline void setPluginAnnular(CalculateRegimeInterface *pluginAnnular) { _pluginAnnular = pluginAnnular; }; 00037 inline void setPluginDispersed(CalculateRegimeInterface *pluginDispersed) { _pluginDispersed = pluginDispersed; }; 00038 inline void setPluginStratified(CalculateRegimeInterface *pluginStratified) { _pluginStratified = pluginStratified; }; 00039 inline void setPluginSlug(CalculateRegimeInterface *pluginSlug) { _pluginSlug = pluginSlug; }; 00040 00041 inline void setEnabledAnnular(bool enabled) { _enabledAnnular = enabled; }; 00042 inline void setEnabledDispersed(bool enabled) { _enabledDispersed = enabled; }; 00043 inline void setEnabledStratified(bool enabled) { _enabledStratified = enabled; }; 00044 inline void setEnabledSlug(bool enabled) { _enabledSlug = enabled; }; 00045 00047 inline CalculateRegimeInterface * pluginAnnular() { return _pluginAnnular; }; 00048 inline CalculateRegimeInterface * pluginDispersed() { return _pluginDispersed; }; 00049 inline CalculateRegimeInterface * pluginStratified() { return _pluginStratified; }; 00050 inline CalculateRegimeInterface * pluginSlug() { return _pluginSlug; }; 00051 00052 inline bool isEnabledAnnular() { return _enabledAnnular; }; 00053 inline bool isEnabledDispersed() { return _enabledDispersed; }; 00054 inline bool isEnabledStratified() { return _enabledStratified; }; 00055 inline bool isEnabledSlug() { return _enabledSlug; }; 00056 00057 inline bool isDefined() { if (_pluginAnnular != NULL && _pluginDispersed != NULL && _pluginStratified != NULL && _pluginSlug != NULL) { return true; } return false; }; 00058 00059 private: 00060 CalculateRegimeInterface *_pluginAnnular; 00061 CalculateRegimeInterface *_pluginDispersed; 00062 CalculateRegimeInterface *_pluginStratified; 00063 CalculateRegimeInterface *_pluginSlug; 00064 00065 bool _enabledAnnular; 00066 bool _enabledDispersed; 00067 bool _enabledStratified; 00068 bool _enabledSlug; 00069 }; 00070 00071 #endif // FRICTIONFUNCTIONS_H