/////////////////////////////////////////////////////////////////////////////////////////////////// // File fem_soil.h #pragma once #include namespace fem { class FEM_DLL_DECL CTCSoil : public fem::CTCBaseObj { friend class boost::serialization::access; template void save(Archive & ar, const unsigned int /*version*/) const { ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(fem::CTCBaseObj); ar & BOOST_SERIALIZATION_NVP(m_intProps); ar & BOOST_SERIALIZATION_NVP(m_dblProps); } template void load(Archive & ar, const unsigned int /*version*/) { ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(fem::CTCBaseObj); ar & BOOST_SERIALIZATION_NVP(m_intProps); ar & BOOST_SERIALIZATION_NVP(m_dblProps); } BOOST_SERIALIZATION_SPLIT_MEMBER(); DECLARE_SERIAL(CTCSoil) public: enum eSoftType { eSoft_Yes =0, // Μαλακό eSoft_No , // Όχι Μαλακό eSoft_Max , }; enum eSensType { eSens_Yes =0, // Ευπαθές eSens_No , // Όχι Ευπαθές eSens_Max , }; static const double s_props[3]; CTCSoil(); CTCSoil(const CString& szName, const CString& szComment=_T("")); CTCSoil(const CString& szName, int eSoft, int eSens, double Ks, double Sigma, double gs, const CString& szComment=_T("")); virtual ~CTCSoil(); virtual void Serialize(CArchive& ar); virtual void SerializeDB(bool bWriting, CTOLRecordset& rs); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif eSoftType SoftType () const { return static_cast(m_intProps.get(0)); } eSensType SensType () const { return static_cast(m_intProps.get(1)); } double Ks () const { return m_dblProps.get(0); } double Sigma () const { return m_dblProps.get(1); } double gs () const { return m_dblProps.get(2); } void Set_SoftType(int i, undo::eCmdType ctCmd = undo::cmdDo) { m_intProps.set(0, i, ctCmd); } void Set_SensType(int i, undo::eCmdType ctCmd = undo::cmdDo) { m_intProps.set(1, i, ctCmd); } void Set_Ks (double d, undo::eCmdType ctCmd = undo::cmdDo) { m_dblProps.set(0, d, ctCmd); } void Set_Sigma (double d, undo::eCmdType ctCmd = undo::cmdDo) { m_dblProps.set(1, d, ctCmd); } void Set_gs (double d, undo::eCmdType ctCmd = undo::cmdDo) { m_dblProps.set(2, d, ctCmd); } private: fem::CPropRepository m_intProps; fem::CPropRepository m_dblProps; // Δείκτης Εδάφους [kN/m3] // Επιτρεπόμενη τάση [kN/m2] // Ειδικό βάρος [kK/m3] static const long m_nVersion; }; } // namespace fem BOOST_CLASS_VERSION(fem::CTCSoil, 1);