| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #pragma once
- #include "DBBase.h"
- #include "Element.h"
- #include "PosXray.h"
- namespace OTSSQLITE
- {
- using namespace OTSDATA;
- class __declspec(dllexport) CElementChemistryDB
- {
- public:
- CElementChemistryDB(CDBStoreBasePtr a_datastore);
- ~CElementChemistryDB();
- CElementChemistriesList GetElementChemistryListById(const long a_nXrayId, const long a_nFieldId, const long a_nElementSize);
- CPosXrayInfoList& GetXrayInfoList(const BOOL a_bForce = FALSE);
- BOOL SaveElementChemistriesList(const CPosXraysList& a_xrayPointList);
- BOOL SaveElementChemistriesList(const CPosXrayPtr a_pxrayPoint);
- BOOL DeleteElementChemistryById(const long a_nFieldId, const long a_nXrayId);
- virtual CDBTableBasePtr GetTableInfo() ;
- virtual BOOL Init(const BOOL a_bClean = FALSE) ;
- virtual BOOL CreateTable(const BOOL a_bForce = FALSE) ;
- virtual BOOL DeleteTable() ;
- virtual BOOL RemoveAllRows() ;
- virtual BOOL IsDBExist() ;
- virtual CDBStoreBasePtr GetDatastore() ;
- virtual CDBQueryBasePtr GetTableQuery(LPCTSTR a_sOrderColumnName = nullptr) ;
- protected:
- BOOL ReadXrayPointInfoList();
- CPosXrayInfoList ReadXrayPointInfoList(CDBQueryBasePtr a_query);
- CPosXrayInfoPtr ReadPosXrayInfo(CDBQueryBasePtr a_query);
- CDBQueryBasePtr GetQueryById(const long a_nXrayId, const long a_nFieldId, const long a_nElementId, const long a_nElementNum);
- protected:
- CDBTableBasePtr m_tableInfo;
- CElementChemistriesList m_listElementChemistry;
- CPosXrayInfoList m_listPosXrayInfo;
- private:
- CDBBasePtr myDB;
- };
- typedef std::shared_ptr<CElementChemistryDB> __declspec(dllexport) CElementChemistryDBPtr;
- }
|