Index: src/libchcore/ISerializerContainer.h =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/ISerializerContainer.h (.../ISerializerContainer.h) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/ISerializerContainer.h (.../ISerializerContainer.h) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -26,7 +26,6 @@ BEGIN_CHCORE_NAMESPACE class ISerializerRowData; -typedef boost::shared_ptr ISerializerRowDataPtr; class TRemovedObjects; class LIBCHCORE_API ISerializerContainer @@ -38,7 +37,7 @@ virtual IColumnsDefinition& GetColumnsDefinition() = 0; // prepare data to be stored - virtual ISerializerRowDataPtr GetRow(size_t stRowID, bool bMarkAsAdded) = 0; + virtual ISerializerRowData& GetRow(size_t stRowID, bool bMarkAsAdded) = 0; virtual void DeleteRow(size_t stRowID) = 0; virtual void DeleteRows(const TRemovedObjects& setObjects) = 0; Index: src/libchcore/ISerializerRowData.h =================================================================== diff -u -r31c4b1fc46687ed2cf35dd9fa0acec2543ae1886 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/ISerializerRowData.h (.../ISerializerRowData.h) (revision 31c4b1fc46687ed2cf35dd9fa0acec2543ae1886) +++ src/libchcore/ISerializerRowData.h (.../ISerializerRowData.h) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -20,7 +20,8 @@ #define __ISERIALIZERROWWRITER_H__ #include "libchcore.h" -#include "TRowData.h" +#include "TString.h" +#include "TPath.h" BEGIN_CHCORE_NAMESPACE @@ -32,12 +33,20 @@ public: virtual ~ISerializerRowData(); - virtual ISerializerRowData& operator%(const TRowData& rData) = 0; - virtual ISerializerRowData& SetValue(const TRowData& rData) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, bool bValue) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, short iValue) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, unsigned short uiValue) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, int iValue) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, unsigned int uiValue) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, long lValue) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, unsigned long ulValue) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, long long llValue) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, unsigned long long llValue) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, double dValue) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, const TString& strValue) = 0; + virtual ISerializerRowData& SetValue(const TString& strColName, const TSmartPath& pathValue) = 0; }; -typedef boost::shared_ptr ISerializerRowDataPtr; - END_CHCORE_NAMESPACE #endif Index: src/libchcore/TBasePathData.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TBasePathData.cpp (.../TBasePathData.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TBasePathData.cpp (.../TBasePathData.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -26,7 +26,6 @@ #include "SerializationHelpers.h" #include "TCoreException.h" #include "ErrorCodes.h" -#include "TRowData.h" #include "ISerializerContainer.h" #include "ISerializerRowData.h" #include @@ -94,22 +93,19 @@ if(!spContainer) THROW_CORE_EXCEPTION(eErr_InvalidPointer); - ISerializerRowDataPtr spRow; - bool bAdded = m_setModifications[eMod_Added]; if(m_setModifications.any()) - spRow = spContainer->GetRow(m_stObjectID, bAdded); - else - return; + { + ISerializerRowData& rRow = spContainer->GetRow(m_stObjectID, bAdded); + if(bAdded || m_setModifications[eMod_SrcPath]) + rRow.SetValue(_T("src_path"), m_pathSrc); + if(bAdded || m_setModifications[eMod_SkipProcessing]) + rRow.SetValue(_T("skip_processing"), m_bSkipFurtherProcessing); + if(bAdded || m_setModifications[eMod_DstPath]) + rRow.SetValue(_T("dst_path"), m_pathDst); - if(bAdded || m_setModifications[eMod_SrcPath]) - *spRow % TRowData(_T("src_path"), m_pathSrc); - if(bAdded || m_setModifications[eMod_SkipProcessing]) - *spRow % TRowData(_T("skip_processing"), m_bSkipFurtherProcessing); - if(bAdded || m_setModifications[eMod_DstPath]) - *spRow % TRowData(_T("dst_path"), m_pathDst); - - m_setModifications.reset(); + m_setModifications.reset(); + } } void TBasePathData::InitColumns(IColumnsDefinition& rColumns) Index: src/libchcore/TConfig.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TConfig.cpp (.../TConfig.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TConfig.cpp (.../TConfig.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -39,7 +39,6 @@ #include "ConfigNodeContainer.h" #include "ErrorCodes.h" #include "TCoreException.h" -#include "TRowData.h" #include "ISerializerRowData.h" BEGIN_CHCORE_NAMESPACE @@ -148,22 +147,19 @@ BOOST_FOREACH(const ConfigNode& rNode, m_pImpl->m_mic) { - ISerializerRowDataPtr spRow; - bool bAdded = rNode.m_setModifications[ConfigNode::eMod_Added]; if(rNode.m_setModifications.any()) - spRow = spContainer->GetRow(rNode.m_stObjectID, bAdded); - else - continue; + { + ISerializerRowData& rRow = spContainer->GetRow(rNode.m_stObjectID, bAdded); + if(bAdded || rNode.m_setModifications[ConfigNode::eMod_NodeName]) + rRow.SetValue(_T("name"), rNode.GetNodeName()); + if(bAdded || rNode.m_setModifications[ConfigNode::eMod_Order]) + rRow.SetValue(_T("node_order"), rNode.GetOrder()); + if(bAdded || rNode.m_setModifications[ConfigNode::eMod_Value]) + rRow.SetValue(_T("value"), rNode.m_strValue.Get()); - if(bAdded || rNode.m_setModifications[ConfigNode::eMod_NodeName]) - *spRow % TRowData(_T("name"), rNode.GetNodeName()); - if(bAdded || rNode.m_setModifications[ConfigNode::eMod_Order]) - *spRow % TRowData(_T("node_order"), rNode.GetOrder()); - if(bAdded || rNode.m_setModifications[ConfigNode::eMod_Value]) - *spRow % TRowData(_T("value"), rNode.m_strValue.Get()); - - rNode.m_setModifications.reset(); + rNode.m_setModifications.reset(); + } } } Index: src/libchcore/TFileFilter.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TFileFilter.cpp (.../TFileFilter.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TFileFilter.cpp (.../TFileFilter.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -570,70 +570,68 @@ void TFileFilter::Store(const ISerializerContainerPtr& spContainer) const { - ISerializerRowDataPtr spRow; - bool bAdded = m_setModifications[eMod_Added]; if(m_setModifications.any()) - spRow = spContainer->GetRow(m_stObjectID, bAdded); - else - return; + { + ISerializerRowData& rRow = spContainer->GetRow(m_stObjectID, bAdded); - if(bAdded || m_setModifications[eMod_UseMask]) - *spRow % TRowData(_T("use_mask"), m_bUseMask); - if(bAdded || m_setModifications[eMod_Mask]) - *spRow % TRowData(_T("mask"), GetCombinedMask()); - if(bAdded || m_setModifications[eMod_UseExcludeMask]) - *spRow % TRowData(_T("use_exclude_mask"), m_bUseExcludeMask); - if(bAdded || m_setModifications[eMod_ExcludeMask]) - *spRow % TRowData(_T("exclude_mask"), GetCombinedExcludeMask()); - if(bAdded || m_setModifications[eMod_UseSize1]) - *spRow % TRowData(_T("use_size_1"), m_bUseSize1); - if(bAdded || m_setModifications[eMod_SizeCmpType1]) - *spRow % TRowData(_T("compare_type_1"), m_eSizeCmpType1); - if(bAdded || m_setModifications[eMod_Size1]) - *spRow % TRowData(_T("size_1"), m_ullSize1); - if(bAdded || m_setModifications[eMod_UseSize2]) - *spRow % TRowData(_T("use_size_2"), m_bUseSize2); - if(bAdded || m_setModifications[eMod_SizeCmpType2]) - *spRow % TRowData(_T("compare_type_2"), m_eSizeCmpType2); - if(bAdded || m_setModifications[eMod_Size2]) - *spRow % TRowData(_T("size_2"), m_ullSize2); - if(bAdded || m_setModifications[eMod_DateType]) - *spRow % TRowData(_T("date_type"), m_eDateType); - if(bAdded || m_setModifications[eMod_UseDateTime1]) - *spRow % TRowData(_T("use_date_time_1"), m_bUseDateTime1); - if(bAdded || m_setModifications[eMod_DateCmpType1]) - *spRow % TRowData(_T("date_compare_type_1"), m_eDateCmpType1); - if(bAdded || m_setModifications[eMod_UseDate1]) - *spRow % TRowData(_T("use_date_1"), m_bUseDate1); - if(bAdded || m_setModifications[eMod_UseTime1]) - *spRow % TRowData(_T("use_time_1"), m_bUseTime1); - if(bAdded || m_setModifications[eMod_DateTime1]) - *spRow % TRowData(_T("datetime_1"), m_tDateTime1.Get().GetAsTimeT()); - if(bAdded || m_setModifications[eMod_UseDateTime2]) - *spRow % TRowData(_T("use_date_time_2"), m_bUseDateTime2); - if(bAdded || m_setModifications[eMod_DateCmpType2]) - *spRow % TRowData(_T("date_compare_type_2"), m_eDateCmpType2); - if(bAdded || m_setModifications[eMod_UseDate2]) - *spRow % TRowData(_T("use_date_2"), m_bUseDate2); - if(bAdded || m_setModifications[eMod_UseTime2]) - *spRow % TRowData(_T("use_time_2"), m_bUseTime2); - if(bAdded || m_setModifications[eMod_DateTime2]) - *spRow % TRowData(_T("datetime_2"), m_tDateTime2.Get().GetAsTimeT()); - if(bAdded || m_setModifications[eMod_UseAttributes]) - *spRow % TRowData(_T("use_attributes"), m_bUseAttributes); - if(bAdded || m_setModifications[eMod_AttrArchive]) - *spRow % TRowData(_T("attr_archive"), m_iArchive); - if(bAdded || m_setModifications[eMod_AttrReadOnly]) - *spRow % TRowData(_T("attr_ro"), m_iReadOnly); - if(bAdded || m_setModifications[eMod_AttrHidden]) - *spRow % TRowData(_T("attr_hidden"), m_iHidden); - if(bAdded || m_setModifications[eMod_AttrSystem]) - *spRow % TRowData(_T("attr_system"), m_iSystem); - if(bAdded || m_setModifications[eMod_AttrDirectory]) - *spRow % TRowData(_T("attr_directory"), m_iDirectory); + if(bAdded || m_setModifications[eMod_UseMask]) + rRow.SetValue(_T("use_mask"), m_bUseMask); + if(bAdded || m_setModifications[eMod_Mask]) + rRow.SetValue(_T("mask"), GetCombinedMask()); + if(bAdded || m_setModifications[eMod_UseExcludeMask]) + rRow.SetValue(_T("use_exclude_mask"), m_bUseExcludeMask); + if(bAdded || m_setModifications[eMod_ExcludeMask]) + rRow.SetValue(_T("exclude_mask"), GetCombinedExcludeMask()); + if(bAdded || m_setModifications[eMod_UseSize1]) + rRow.SetValue(_T("use_size_1"), m_bUseSize1); + if(bAdded || m_setModifications[eMod_SizeCmpType1]) + rRow.SetValue(_T("compare_type_1"), m_eSizeCmpType1); + if(bAdded || m_setModifications[eMod_Size1]) + rRow.SetValue(_T("size_1"), m_ullSize1); + if(bAdded || m_setModifications[eMod_UseSize2]) + rRow.SetValue(_T("use_size_2"), m_bUseSize2); + if(bAdded || m_setModifications[eMod_SizeCmpType2]) + rRow.SetValue(_T("compare_type_2"), m_eSizeCmpType2); + if(bAdded || m_setModifications[eMod_Size2]) + rRow.SetValue(_T("size_2"), m_ullSize2); + if(bAdded || m_setModifications[eMod_DateType]) + rRow.SetValue(_T("date_type"), m_eDateType); + if(bAdded || m_setModifications[eMod_UseDateTime1]) + rRow.SetValue(_T("use_date_time_1"), m_bUseDateTime1); + if(bAdded || m_setModifications[eMod_DateCmpType1]) + rRow.SetValue(_T("date_compare_type_1"), m_eDateCmpType1); + if(bAdded || m_setModifications[eMod_UseDate1]) + rRow.SetValue(_T("use_date_1"), m_bUseDate1); + if(bAdded || m_setModifications[eMod_UseTime1]) + rRow.SetValue(_T("use_time_1"), m_bUseTime1); + if(bAdded || m_setModifications[eMod_DateTime1]) + rRow.SetValue(_T("datetime_1"), m_tDateTime1.Get().GetAsTimeT()); + if(bAdded || m_setModifications[eMod_UseDateTime2]) + rRow.SetValue(_T("use_date_time_2"), m_bUseDateTime2); + if(bAdded || m_setModifications[eMod_DateCmpType2]) + rRow.SetValue(_T("date_compare_type_2"), m_eDateCmpType2); + if(bAdded || m_setModifications[eMod_UseDate2]) + rRow.SetValue(_T("use_date_2"), m_bUseDate2); + if(bAdded || m_setModifications[eMod_UseTime2]) + rRow.SetValue(_T("use_time_2"), m_bUseTime2); + if(bAdded || m_setModifications[eMod_DateTime2]) + rRow.SetValue(_T("datetime_2"), m_tDateTime2.Get().GetAsTimeT()); + if(bAdded || m_setModifications[eMod_UseAttributes]) + rRow.SetValue(_T("use_attributes"), m_bUseAttributes); + if(bAdded || m_setModifications[eMod_AttrArchive]) + rRow.SetValue(_T("attr_archive"), m_iArchive); + if(bAdded || m_setModifications[eMod_AttrReadOnly]) + rRow.SetValue(_T("attr_ro"), m_iReadOnly); + if(bAdded || m_setModifications[eMod_AttrHidden]) + rRow.SetValue(_T("attr_hidden"), m_iHidden); + if(bAdded || m_setModifications[eMod_AttrSystem]) + rRow.SetValue(_T("attr_system"), m_iSystem); + if(bAdded || m_setModifications[eMod_AttrDirectory]) + rRow.SetValue(_T("attr_directory"), m_iDirectory); - m_setModifications.reset(); + m_setModifications.reset(); + } } void TFileFilter::Load(const ISerializerRowReaderPtr& spRowReader) Index: src/libchcore/TFileInfo.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TFileInfo.cpp (.../TFileInfo.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TFileInfo.cpp (.../TFileInfo.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -22,7 +22,6 @@ #include "TFileInfo.h" #include "TCoreException.h" #include "ErrorCodes.h" -#include "TRowData.h" #include "ISerializerRowData.h" #include "ISerializerContainer.h" @@ -249,30 +248,29 @@ void TFileInfo::Store(const ISerializerContainerPtr& spContainer) const { - ISerializerRowDataPtr spRow; if(m_setModifications.any()) - spRow = spContainer->GetRow(m_stObjectID, m_setModifications[eMod_Added]); - else - return; + { + ISerializerRowData& rRow = spContainer->GetRow(m_stObjectID, m_setModifications[eMod_Added]); - if(m_setModifications[eMod_Path]) - *spRow % TRowData(_T("rel_path"), m_pathFile); - if(m_setModifications[eMod_BasePath]) - *spRow % TRowData(_T("base_path_id"), m_spBasePathData.Get()->GetObjectID()); - if(m_setModifications[eMod_Attributes]) - *spRow % TRowData(_T("attr"), m_dwAttributes); - if(m_setModifications[eMod_FileSize]) - *spRow % TRowData(_T("size"), m_uhFileSize); - if(m_setModifications[eMod_TimeCreated]) - *spRow % TRowData(_T("time_created"), m_ftCreation.Get().ToUInt64()); - if(m_setModifications[eMod_TimeLastWrite]) - *spRow % TRowData(_T("time_last_write"), m_ftLastWrite.Get().ToUInt64()); - if(m_setModifications[eMod_TimeLastAccess]) - *spRow % TRowData(_T("time_last_access"), m_ftLastAccess.Get().ToUInt64()); - if(m_setModifications[eMod_Flags]) - *spRow % TRowData(_T("flags"), m_uiFlags); + if(m_setModifications[eMod_Path]) + rRow.SetValue(_T("rel_path"), m_pathFile); + if(m_setModifications[eMod_BasePath]) + rRow.SetValue(_T("base_path_id"), m_spBasePathData.Get()->GetObjectID()); + if(m_setModifications[eMod_Attributes]) + rRow.SetValue(_T("attr"), m_dwAttributes); + if(m_setModifications[eMod_FileSize]) + rRow.SetValue(_T("size"), m_uhFileSize); + if(m_setModifications[eMod_TimeCreated]) + rRow.SetValue(_T("time_created"), m_ftCreation.Get().ToUInt64()); + if(m_setModifications[eMod_TimeLastWrite]) + rRow.SetValue(_T("time_last_write"), m_ftLastWrite.Get().ToUInt64()); + if(m_setModifications[eMod_TimeLastAccess]) + rRow.SetValue(_T("time_last_access"), m_ftLastAccess.Get().ToUInt64()); + if(m_setModifications[eMod_Flags]) + rRow.SetValue(_T("flags"), m_uiFlags); - m_setModifications.reset(); + m_setModifications.reset(); + } } void TFileInfo::InitColumns(IColumnsDefinition& rColumns) Index: src/libchcore/TModPathContainer.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TModPathContainer.cpp (.../TModPathContainer.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TModPathContainer.cpp (.../TModPathContainer.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -21,7 +21,6 @@ #include "TCoreException.h" #include "ErrorCodes.h" #include "TPathContainer.h" -#include "TRowData.h" #include "ISerializerRowData.h" BEGIN_CHCORE_NAMESPACE @@ -290,16 +289,16 @@ for(DataMap::const_iterator iterPath = m_vPaths.begin(); iterPath != m_vPaths.end(); ++iterPath) { const TModificationTracker& rItem = iterPath->second; - ISerializerRowDataPtr spRow; if(rItem.IsModified()) - spRow = spContainer->GetRow(iterPath->first, rItem.IsAdded()); + { + ISerializerRowData& rRow = spContainer->GetRow(iterPath->first, rItem.IsAdded()); + rRow.SetValue(_T("path"), rItem); + + rItem.ClearModifications(); + } else continue; - - *spRow % TRowData(_T("path"), rItem); - - rItem.ClearModifications(); } } Fisheye: Tag a3d1e4c03280ece94af75d9aef32a65266cf8050 refers to a dead (removed) revision in file `src/libchcore/TRowData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag a3d1e4c03280ece94af75d9aef32a65266cf8050 refers to a dead (removed) revision in file `src/libchcore/TRowData.h'. Fisheye: No comparison available. Pass `N' to diff? Index: src/libchcore/TSQLiteSerializerContainer.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSQLiteSerializerContainer.cpp (.../TSQLiteSerializerContainer.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TSQLiteSerializerContainer.cpp (.../TSQLiteSerializerContainer.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -48,13 +48,13 @@ { } -ISerializerRowDataPtr TSQLiteSerializerContainer::GetRow(size_t stRowID, bool bMarkAsAdded) +ISerializerRowData& TSQLiteSerializerContainer::GetRow(size_t stRowID, bool bMarkAsAdded) { RowMap::iterator iterFnd = m_mapRows.find(stRowID); if(iterFnd == m_mapRows.end()) - iterFnd = m_mapRows.insert(std::make_pair(stRowID, TSQLiteSerializerRowDataPtr(new TSQLiteSerializerRowData(stRowID, m_tColumns, bMarkAsAdded)))).first; + iterFnd = m_mapRows.insert(std::make_pair(stRowID, TSQLiteSerializerRowData(stRowID, m_tColumns, bMarkAsAdded))).first; else if(bMarkAsAdded) - iterFnd->second->MarkAsAdded(); + iterFnd->second.MarkAsAdded(); return (*iterFnd).second; } @@ -93,17 +93,17 @@ FlushDeletions(); // group rows that can be executed with one preparation - std::map> mapGroups; - std::map>::iterator iterMapGroups; + std::map> mapGroups; + std::map>::iterator iterMapGroups; for(RowMap::iterator iterRows = m_mapRows.begin(); iterRows != m_mapRows.end(); ++iterRows) { - TRowID rowID = iterRows->second->GetChangeIdentification(); + TRowID rowID = iterRows->second.GetChangeIdentification(); iterMapGroups = mapGroups.find(rowID); if(iterMapGroups == mapGroups.end()) - iterMapGroups = mapGroups.insert(std::make_pair(rowID, std::vector())).first; + iterMapGroups = mapGroups.insert(std::make_pair(rowID, std::vector())).first; - iterMapGroups->second.push_back(iterRows->second); + iterMapGroups->second.push_back(&iterRows->second); } TSQLiteStatement tStatement(m_spDB); @@ -112,7 +112,7 @@ { if(iterMapGroups->first.HasAny()) { - std::vector& rGroupRows = iterMapGroups->second; + std::vector& rGroupRows = iterMapGroups->second; // query is generated from the first item in a group TString strQuery = rGroupRows.front()->GetQuery(m_strName); @@ -121,7 +121,7 @@ tStatement.Prepare(strQuery); - for(std::vector::iterator iterRow = iterMapGroups->second.begin(); iterRow != iterMapGroups->second.end(); ++iterRow) + for(std::vector::iterator iterRow = iterMapGroups->second.begin(); iterRow != iterMapGroups->second.end(); ++iterRow) { (*iterRow)->BindParamsAndExec(tStatement); tStatement.ClearBindings(); Index: src/libchcore/TSQLiteSerializerContainer.h =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSQLiteSerializerContainer.h (.../TSQLiteSerializerContainer.h) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TSQLiteSerializerContainer.h (.../TSQLiteSerializerContainer.h) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -40,7 +40,7 @@ virtual IColumnsDefinition& GetColumnsDefinition(); - virtual ISerializerRowDataPtr GetRow(size_t stRowID, bool bMarkAsAdded); + virtual ISerializerRowData& GetRow(size_t stRowID, bool bMarkAsAdded); virtual void DeleteRow(size_t stRowID); virtual void DeleteRows(const TRemovedObjects& setObjects); @@ -56,7 +56,7 @@ #pragma warning(disable: 4251) boost::optional m_stParentID; - typedef std::map RowMap; // maps row id to row data + typedef std::map RowMap; // maps row id to row data RowMap m_mapRows; TSQLiteColumnsDefinition m_tColumns; Index: src/libchcore/TSQLiteSerializerRowData.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSQLiteSerializerRowData.cpp (.../TSQLiteSerializerRowData.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TSQLiteSerializerRowData.cpp (.../TSQLiteSerializerRowData.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -168,34 +168,91 @@ { } +TSQLiteSerializerRowData::TSQLiteSerializerRowData(const TSQLiteSerializerRowData& rSrc) : + m_stRowID(rSrc.m_stRowID), + m_bAdded(rSrc.m_bAdded), + m_rColumns(rSrc.m_rColumns), + m_mapValues(rSrc.m_mapValues) +{ +} + TSQLiteSerializerRowData::~TSQLiteSerializerRowData() { } -ISerializerRowData& TSQLiteSerializerRowData::operator%(const TRowData& rData) +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColumn, const InternalVariant& rData) { - size_t stColumn = m_rColumns.GetColumnIndex(rData.m_strColName); - std::map::iterator iterFnd = m_mapValues.find(stColumn); + size_t stColumn = m_rColumns.GetColumnIndex(strColumn); + + std::map::iterator iterFnd = m_mapValues.find(stColumn); if(iterFnd == m_mapValues.end()) - m_mapValues.insert(std::make_pair(stColumn, rData.m_varValue)); + m_mapValues.insert(std::make_pair(stColumn, rData)); else - (*iterFnd).second = rData.m_varValue; + (*iterFnd).second = rData; return *this; } -ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TRowData& rData) +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, bool bValue) { - size_t stColumn = m_rColumns.GetColumnIndex(rData.m_strColName); - std::map::iterator iterFnd = m_mapValues.find(stColumn); - if(iterFnd == m_mapValues.end()) - m_mapValues.insert(std::make_pair(stColumn, rData.m_varValue)); - else - (*iterFnd).second = rData.m_varValue; + return SetValue(strColName, InternalVariant(bValue)); +} - return *this; +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, short siValue) +{ + return SetValue(strColName, InternalVariant(siValue)); } +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, unsigned short usiValue) +{ + return SetValue(strColName, InternalVariant(usiValue)); +} + +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, int iValue) +{ + return SetValue(strColName, InternalVariant(iValue)); +} + +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, unsigned int uiValue) +{ + return SetValue(strColName, InternalVariant(uiValue)); +} + +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, long lValue) +{ + return SetValue(strColName, InternalVariant(lValue)); +} + +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, unsigned long ulValue) +{ + return SetValue(strColName, InternalVariant(ulValue)); +} + +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, long long llValue) +{ + return SetValue(strColName, InternalVariant(llValue)); +} + +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, unsigned long long ullValue) +{ + return SetValue(strColName, InternalVariant(ullValue)); +} + +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, double dValue) +{ + return SetValue(strColName, InternalVariant(dValue)); +} + +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, const TString& strValue) +{ + return SetValue(strColName, InternalVariant(strValue)); +} + +ISerializerRowData& TSQLiteSerializerRowData::SetValue(const TString& strColName, const TSmartPath& pathValue) +{ + return SetValue(strColName, InternalVariant(pathValue)); +} + void TSQLiteSerializerRowData::BindParamsAndExec(sqlite::TSQLiteStatement& tStatement) { using namespace sqlite; Index: src/libchcore/TSQLiteSerializerRowData.h =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSQLiteSerializerRowData.h (.../TSQLiteSerializerRowData.h) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TSQLiteSerializerRowData.h (.../TSQLiteSerializerRowData.h) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -23,10 +23,10 @@ #include "ISerializerRowData.h" #include "TSQLiteColumnDefinition.h" #include "ISerializerContainer.h" -#include "TRowData.h" #include "TSQLiteDatabase.h" #include "TSQLiteStatement.h" #include +#include BEGIN_CHCORE_NAMESPACE @@ -56,15 +56,41 @@ class LIBCHCORE_API TSQLiteSerializerRowData : public ISerializerRowData { private: - TSQLiteSerializerRowData(const TSQLiteSerializerRowData&); - TSQLiteSerializerRowData& operator=(const TSQLiteSerializerRowData&); + typedef boost::variant< + bool, + short, + unsigned short, + int, + unsigned int, + long, + unsigned long, + long long, + unsigned long long, + double, + TString, + TSmartPath + > InternalVariant; +private: + TSQLiteSerializerRowData& operator=(const TSQLiteSerializerRowData& rSrc); + public: TSQLiteSerializerRowData(size_t stRowID, TSQLiteColumnsDefinition& rColumnDefinition, bool bAdded); + TSQLiteSerializerRowData(const TSQLiteSerializerRowData& rSrc); virtual ~TSQLiteSerializerRowData(); - virtual ISerializerRowData& operator%(const TRowData& rData); - virtual ISerializerRowData& SetValue(const TRowData& rData); + virtual ISerializerRowData& SetValue(const TString& strColName, bool bValue); + virtual ISerializerRowData& SetValue(const TString& strColName, short iValue); + virtual ISerializerRowData& SetValue(const TString& strColName, unsigned short uiValue); + virtual ISerializerRowData& SetValue(const TString& strColName, int iValue); + virtual ISerializerRowData& SetValue(const TString& strColName, unsigned int uiValue); + virtual ISerializerRowData& SetValue(const TString& strColName, long lValue); + virtual ISerializerRowData& SetValue(const TString& strColName, unsigned long ulValue); + virtual ISerializerRowData& SetValue(const TString& strColName, long long llValue); + virtual ISerializerRowData& SetValue(const TString& strColName, unsigned long long llValue); + virtual ISerializerRowData& SetValue(const TString& strColName, double dValue); + virtual ISerializerRowData& SetValue(const TString& strColName, const TString& strValue); + virtual ISerializerRowData& SetValue(const TString& strColName, const TSmartPath& pathValue); TString GetQuery(const TString& strContainerName) const; TRowID GetChangeIdentification() const; @@ -74,13 +100,16 @@ void MarkAsAdded(); private: + ISerializerRowData& SetValue(const TString& strColumn, const InternalVariant& rData); + +private: size_t m_stRowID; bool m_bAdded; #pragma warning(push) #pragma warning(disable: 4251) TSQLiteColumnsDefinition& m_rColumns; - typedef std::map MapVariants; // column id -> variant data + typedef std::map MapVariants; // column id -> variant data MapVariants m_mapValues; #pragma warning(pop) }; Index: src/libchcore/TSubTaskArray.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSubTaskArray.cpp (.../TSubTaskArray.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TSubTaskArray.cpp (.../TSubTaskArray.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -183,10 +183,9 @@ ISerializerContainerPtr spContainer = spSerializer->GetContainer(_T("subtasks_info")); InitSubtasksInfoColumns(spContainer); - ISerializerRowDataPtr spRow = spContainer->GetRow(0, bAdded); + ISerializerRowData& rRow = spContainer->GetRow(0, bAdded); - *spRow - % TRowData(_T("operation"), m_eOperationType.Get()); + rRow.SetValue(_T("operation"), m_eOperationType.Get()); } /////////////////////////////////////////////////////////////////////// @@ -195,8 +194,6 @@ InitSubtasksColumns(spContainer); - ISerializerRowDataPtr spRow; - // base data long lCurrentIndex = m_lSubOperationIndex.load(boost::memory_order_acquire); @@ -210,11 +207,10 @@ { const std::pair& rCurrentSubTask = m_vSubTasks[stSubOperationIndex]; - spRow = spContainer->GetRow(stSubOperationIndex, bAdded); - *spRow - % TRowData(_T("type"), rCurrentSubTask.first->GetSubOperationType()) - % TRowData(_T("is_current"), false) - % TRowData(_T("is_estimation"), rCurrentSubTask.second); + ISerializerRowData& rRow = spContainer->GetRow(stSubOperationIndex, bAdded); + rRow.SetValue(_T("type"), rCurrentSubTask.first->GetSubOperationType()); + rRow.SetValue(_T("is_current"), false); + rRow.SetValue(_T("is_estimation"), rCurrentSubTask.second); } } @@ -224,15 +220,15 @@ // mark subtask at current index as "current"; don't do that if we just finished. if(boost::numeric_cast(lCurrentIndex) != m_vSubTasks.size()) { - spRow = spContainer->GetRow(lCurrentIndex, false); - *spRow % TRowData(_T("is_current"), true); + ISerializerRowData& rRow = spContainer->GetRow(lCurrentIndex, false); + rRow.SetValue(_T("is_current"), true); } // unmark the old "current" subtask if(m_lLastStoredIndex != -1) { - spRow = spContainer->GetRow(m_lLastStoredIndex, false); - *spRow % TRowData(_T("is_current"), false); + ISerializerRowData& rRow = spContainer->GetRow(m_lLastStoredIndex, false); + rRow.SetValue(_T("is_current"), false); } } Index: src/libchcore/TSubTaskCopyMove.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -108,15 +108,15 @@ m_ullCurrentFileProcessedSize.Modify() -= ullSizeToSubtract; } - void TCopyMoveProgressInfo::Store(const ISerializerRowDataPtr& spRowData) const + void TCopyMoveProgressInfo::Store(ISerializerRowData& rRowData) const { boost::shared_lock lock(m_lock); if(m_setModifications.any()) { if(m_stCurrentIndex.IsModified()) - *spRowData % TRowData(_T("current_index"), m_stCurrentIndex); + rRowData.SetValue(_T("current_index"), m_stCurrentIndex); if(m_ullCurrentFileProcessedSize.IsModified()) - *spRowData % TRowData(_T("cf_processed_size"), m_ullCurrentFileProcessedSize); + rRowData.SetValue(_T("cf_processed_size"), m_ullCurrentFileProcessedSize); m_setModifications.reset(); } @@ -1321,10 +1321,10 @@ ISerializerContainerPtr spContainer = spSerializer->GetContainer(_T("subtask_copymove")); InitColumns(spContainer); - ISerializerRowDataPtr spRow = spContainer->GetRow(0, !m_tProgressInfo.WasSerialized()); + ISerializerRowData& rRow = spContainer->GetRow(0, !m_tProgressInfo.WasSerialized()); - m_tProgressInfo.Store(spRow); - m_tSubTaskStats.Store(spRow); + m_tProgressInfo.Store(rRow); + m_tSubTaskStats.Store(rRow); } void TSubTaskCopyMove::Load(const ISerializerPtr& spSerializer) Index: src/libchcore/TSubTaskCopyMove.h =================================================================== diff -u -rfc67a825635691930b3ac00dc95b16e59f3d2fae -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSubTaskCopyMove.h (.../TSubTaskCopyMove.h) (revision fc67a825635691930b3ac00dc95b16e59f3d2fae) +++ src/libchcore/TSubTaskCopyMove.h (.../TSubTaskCopyMove.h) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -63,7 +63,7 @@ void IncreaseCurrentFileProcessedSize(unsigned long long ullSizeToAdd); void DecreaseCurrentFileProcessedSize(unsigned long long ullSizeToSubtract); - void Store(const ISerializerRowDataPtr& spRowData) const; + void Store(ISerializerRowData& rRowData) const; static void InitColumns(IColumnsDefinition& rColumns); void Load(const ISerializerRowReaderPtr& spRowReader); bool WasSerialized() const; Index: src/libchcore/TSubTaskDelete.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSubTaskDelete.cpp (.../TSubTaskDelete.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TSubTaskDelete.cpp (.../TSubTaskDelete.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -77,12 +77,12 @@ return m_stCurrentIndex; } - void TDeleteProgressInfo::Store(const ISerializerRowDataPtr& spRowData) const + void TDeleteProgressInfo::Store(ISerializerRowData& rRowData) const { boost::shared_lock lock(m_lock); if(m_stCurrentIndex != m_stLastStoredIndex) { - *spRowData % TRowData(_T("current_index"), m_stCurrentIndex); + rRowData.SetValue(_T("current_index"), m_stCurrentIndex); m_stLastStoredIndex = m_stCurrentIndex; } } @@ -255,10 +255,10 @@ ISerializerContainerPtr spContainer = spSerializer->GetContainer(_T("subtask_delete")); InitColumns(spContainer); - ISerializerRowDataPtr spRow = spContainer->GetRow(0, !m_tProgressInfo.WasSerialized()); + ISerializerRowData& rRow = spContainer->GetRow(0, !m_tProgressInfo.WasSerialized()); - m_tProgressInfo.Store(spRow); - m_tSubTaskStats.Store(spRow); + m_tProgressInfo.Store(rRow); + m_tSubTaskStats.Store(rRow); } void TSubTaskDelete::Load(const ISerializerPtr& spSerializer) Index: src/libchcore/TSubTaskDelete.h =================================================================== diff -u -rfc67a825635691930b3ac00dc95b16e59f3d2fae -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSubTaskDelete.h (.../TSubTaskDelete.h) (revision fc67a825635691930b3ac00dc95b16e59f3d2fae) +++ src/libchcore/TSubTaskDelete.h (.../TSubTaskDelete.h) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -48,7 +48,7 @@ void IncreaseCurrentIndex(); size_t GetCurrentIndex() const; - void Store(const ISerializerRowDataPtr& spRowData) const; + void Store(ISerializerRowData& rRowData) const; static void InitColumns(IColumnsDefinition& rColumns); void Load(const ISerializerRowReaderPtr& spRowReader); bool WasSerialized() const; Index: src/libchcore/TSubTaskFastMove.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSubTaskFastMove.cpp (.../TSubTaskFastMove.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TSubTaskFastMove.cpp (.../TSubTaskFastMove.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -79,12 +79,12 @@ return m_stCurrentIndex; } - void TFastMoveProgressInfo::Store(const ISerializerRowDataPtr& spRowData) const + void TFastMoveProgressInfo::Store(ISerializerRowData& rRowData) const { boost::shared_lock lock(m_lock); if(m_stCurrentIndex != m_stLastStoredIndex) { - *spRowData % TRowData(_T("current_index"), m_stCurrentIndex); + rRowData.SetValue(_T("current_index"), m_stCurrentIndex); m_stLastStoredIndex = m_stCurrentIndex; } } @@ -315,10 +315,10 @@ InitColumns(spContainer); - ISerializerRowDataPtr spRow = spContainer->GetRow(0, !m_tProgressInfo.WasSerialized()); + ISerializerRowData& rRow = spContainer->GetRow(0, !m_tProgressInfo.WasSerialized()); - m_tProgressInfo.Store(spRow); - m_tSubTaskStats.Store(spRow); + m_tProgressInfo.Store(rRow); + m_tSubTaskStats.Store(rRow); } void TSubTaskFastMove::Load(const ISerializerPtr& spSerializer) Index: src/libchcore/TSubTaskFastMove.h =================================================================== diff -u -rfc67a825635691930b3ac00dc95b16e59f3d2fae -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSubTaskFastMove.h (.../TSubTaskFastMove.h) (revision fc67a825635691930b3ac00dc95b16e59f3d2fae) +++ src/libchcore/TSubTaskFastMove.h (.../TSubTaskFastMove.h) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -50,7 +50,7 @@ void IncreaseCurrentIndex(); size_t GetCurrentIndex() const; - void Store(const ISerializerRowDataPtr& spRowData) const; + void Store(ISerializerRowData& rRowData) const; static void InitColumns(IColumnsDefinition& rColumns); void Load(const ISerializerRowReaderPtr& spRowReader); bool WasSerialized() const; Index: src/libchcore/TSubTaskStatsInfo.cpp =================================================================== diff -u -rfc67a825635691930b3ac00dc95b16e59f3d2fae -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSubTaskStatsInfo.cpp (.../TSubTaskStatsInfo.cpp) (revision fc67a825635691930b3ac00dc95b16e59f3d2fae) +++ src/libchcore/TSubTaskStatsInfo.cpp (.../TSubTaskStatsInfo.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -277,45 +277,45 @@ m_tCountSpeed.Modify().AddSample(0, m_tTimer.Get().GetLastTimestamp()); } -void TSubTaskStatsInfo::Store(const ISerializerRowDataPtr& spRowData) const +void TSubTaskStatsInfo::Store(ISerializerRowData& rRowData) const { boost::shared_lock lock(m_lock); if(m_bSubTaskIsRunning.IsModified()) - *spRowData % TRowData(_T("is_running"), m_bSubTaskIsRunning); + rRowData.SetValue(_T("is_running"), m_bSubTaskIsRunning); if(m_bIsInitialized.IsModified()) - *spRowData % TRowData(_T("is_initialized"), m_bIsInitialized); + rRowData.SetValue(_T("is_initialized"), m_bIsInitialized); if(m_ullTotalSize.IsModified()) - *spRowData % TRowData(_T("total_size"), m_ullTotalSize); + rRowData.SetValue(_T("total_size"), m_ullTotalSize); if(m_ullProcessedSize.IsModified()) - *spRowData % TRowData(_T("processed_size"), m_ullProcessedSize); + rRowData.SetValue(_T("processed_size"), m_ullProcessedSize); if(m_tSizeSpeed.IsModified()) - *spRowData % TRowData(_T("size_speed"), m_tSizeSpeed.Get().ToString()); + rRowData.SetValue(_T("size_speed"), m_tSizeSpeed.Get().ToString()); if(m_stTotalCount.IsModified()) - *spRowData % TRowData(_T("total_count"), m_stTotalCount); + rRowData.SetValue(_T("total_count"), m_stTotalCount); if(m_ullProcessedSize.IsModified()) - *spRowData % TRowData(_T("processed_count"), m_stProcessedCount); + rRowData.SetValue(_T("processed_count"), m_stProcessedCount); if(m_tSizeSpeed.IsModified()) - *spRowData % TRowData(_T("count_speed"), m_tCountSpeed.Get().ToString()); + rRowData.SetValue(_T("count_speed"), m_tCountSpeed.Get().ToString()); if(m_ullCurrentItemProcessedSize.IsModified()) - *spRowData % TRowData(_T("ci_processed_size"), m_ullCurrentItemProcessedSize); + rRowData.SetValue(_T("ci_processed_size"), m_ullCurrentItemProcessedSize); if(m_ullCurrentItemTotalSize.IsModified()) - *spRowData % TRowData(_T("ci_total_size"), m_ullCurrentItemTotalSize); + rRowData.SetValue(_T("ci_total_size"), m_ullCurrentItemTotalSize); if(m_tTimer.IsModified()) - *spRowData % TRowData(_T("timer"), m_tTimer.Get().GetTotalTime()); + rRowData.SetValue(_T("timer"), m_tTimer.Get().GetTotalTime()); if(m_iCurrentBufferIndex.IsModified()) - *spRowData % TRowData(_T("buffer_index"), m_iCurrentBufferIndex); + rRowData.SetValue(_T("buffer_index"), m_iCurrentBufferIndex); if(m_strCurrentPath.IsModified()) - *spRowData % TRowData(_T("current_path"), m_strCurrentPath); + rRowData.SetValue(_T("current_path"), m_strCurrentPath); if(m_eSubOperationType.IsModified()) - *spRowData % TRowData(_T("suboperation_type"), m_eSubOperationType); + rRowData.SetValue(_T("suboperation_type"), m_eSubOperationType); m_setModifications.reset(); } Index: src/libchcore/TSubTaskStatsInfo.h =================================================================== diff -u -rfc67a825635691930b3ac00dc95b16e59f3d2fae -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TSubTaskStatsInfo.h (.../TSubTaskStatsInfo.h) (revision fc67a825635691930b3ac00dc95b16e59f3d2fae) +++ src/libchcore/TSubTaskStatsInfo.h (.../TSubTaskStatsInfo.h) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -99,7 +99,7 @@ void SetSubOperationType(ESubOperationType val) { m_eSubOperationType = val; } // serialization - void Store(const ISerializerRowDataPtr& spRowData) const; + void Store(ISerializerRowData& rRowData) const; static void InitColumns(IColumnsDefinition& rColumnDefs); void Load(const ISerializerRowReaderPtr& spRowReader); Index: src/libchcore/TTask.cpp =================================================================== diff -u -rc8e73b75027d5e17fb8b1e1eb40e64f40fc62547 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TTask.cpp (.../TTask.cpp) (revision c8e73b75027d5e17fb8b1e1eb40e64f40fc62547) +++ src/libchcore/TTask.cpp (.../TTask.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -34,7 +34,6 @@ #include "TTaskStatsSnapshot.h" #include "TCoreException.h" #include "ErrorCodes.h" -#include "TRowData.h" #include "ISerializerRowData.h" #include "TStringSet.h" #include "SerializerTrace.h" Index: src/libchcore/TTaskBaseData.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TTaskBaseData.cpp (.../TTaskBaseData.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TTaskBaseData.cpp (.../TTaskBaseData.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -87,19 +87,19 @@ { bool bAdded = m_setChanges[eMod_Added]; - ISerializerRowDataPtr spRow = spContainer->GetRow(0, bAdded); + ISerializerRowData& rRow = spContainer->GetRow(0, bAdded); if(bAdded || m_setChanges[eMod_TaskName]) - *spRow % TRowData(_T("name"), m_strTaskName); + rRow.SetValue(_T("name"), m_strTaskName); if(bAdded || m_setChanges[eMod_LogPath]) - *spRow % TRowData(_T("log_path"), m_pathLog); + rRow.SetValue(_T("log_path"), m_pathLog); if(bAdded || m_setChanges[eMod_CurrentState]) - *spRow % TRowData(_T("current_state"), m_eCurrentState); + rRow.SetValue(_T("current_state"), m_eCurrentState); if(bAdded || m_setChanges[eMod_DstPath]) - *spRow % TRowData(_T("destination_path"), m_pathDestinationPath); + rRow.SetValue(_T("destination_path"), m_pathDestinationPath); m_setChanges.reset(); } Index: src/libchcore/TTaskInfo.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TTaskInfo.cpp (.../TTaskInfo.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TTaskInfo.cpp (.../TTaskInfo.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -19,7 +19,6 @@ #include "stdafx.h" #include "TTaskInfo.h" #include "TCoreException.h" -#include "TRowData.h" #include "ISerializerRowData.h" #include "ISerializerRowReader.h" @@ -77,15 +76,13 @@ if(!m_setModifications.any()) return; - ISerializerRowDataPtr spRow; - bool bAdded = m_setModifications[eMod_Added]; - spRow = spContainer->GetRow(m_stObjectID, bAdded); + ISerializerRowData& rRow = spContainer->GetRow(m_stObjectID, bAdded); if(bAdded || m_setModifications[eMod_TaskPath]) - *spRow % TRowData(_T("path"), m_pathSerializeLocation); + rRow.SetValue(_T("path"), m_pathSerializeLocation); if(bAdded || m_setModifications[eMod_Order]) - *spRow % TRowData(_T("task_order"), m_iOrder); + rRow.SetValue(_T("task_order"), m_iOrder); m_setModifications.reset(); } Index: src/libchcore/TTaskLocalStats.cpp =================================================================== diff -u -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/TTaskLocalStats.cpp (.../TTaskLocalStats.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) +++ src/libchcore/TTaskLocalStats.cpp (.../TTaskLocalStats.cpp) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -28,7 +28,6 @@ #include "TTaskStatsSnapshot.h" #include "ISerializerContainer.h" #include "ISerializerRowData.h" -#include "TRowData.h" BEGIN_CHCORE_NAMESPACE @@ -156,18 +155,17 @@ boost::shared_lock lock(m_lock); InitColumns(spContainer); - ISerializerRowDataPtr spRow; bool bAdded = m_setModifications[eMod_Added]; if(m_setModifications.any()) - spRow = spContainer->GetRow(0, bAdded); - else - return; - - if(bAdded || m_setModifications[eMod_Timer]) { - *spRow % TRowData(_T("elapsed_time"), m_tTimer.Get().GetTotalTime()); - m_setModifications.reset(); + ISerializerRowData& rRow = spContainer->GetRow(0, bAdded); + if(bAdded || m_setModifications[eMod_Timer]) + { + rRow.SetValue(_T("elapsed_time"), m_tTimer.Get().GetTotalTime()); + m_setModifications.reset(); + } } + } void TTaskLocalStatsInfo::Load(const ISerializerContainerPtr& spContainer) Index: src/libchcore/libchcore.vc90.vcproj =================================================================== diff -u -r5693271a6736f524997e3951fc7b7b6323bc6447 -ra3d1e4c03280ece94af75d9aef32a65266cf8050 --- src/libchcore/libchcore.vc90.vcproj (.../libchcore.vc90.vcproj) (revision 5693271a6736f524997e3951fc7b7b6323bc6447) +++ src/libchcore/libchcore.vc90.vcproj (.../libchcore.vc90.vcproj) (revision a3d1e4c03280ece94af75d9aef32a65266cf8050) @@ -1427,14 +1427,6 @@ > - - - -