Fisheye: tag fadd6c9c628de875716d96c3a497b5bc6c8dca8a is not in file src/libchcore/TStringPattern.cpp Fisheye: Tag 22c7d5559ca17c9b1859d2283b667516b23ac597 refers to a dead (removed) revision in file `src/libstring/TStringPattern.cpp'. Fisheye: No comparison available. Pass `N' to diff? Index: src/libchcore/TStringPattern.h =================================================================== diff -u --- src/libchcore/TStringPattern.h (revision 0) +++ src/libchcore/TStringPattern.h (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -0,0 +1,61 @@ +// ============================================================================ +// Copyright (C) 2001-2020 by Jozef Starosczyk +// ixen {at} copyhandler [dot] com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#pragma once + +#include "../libstring/TString.h" +#include "libchcore.h" + +namespace chcore +{ + class LIBCHCORE_API TStringPattern + { + public: + enum class EPatternType + { + eType_Wildcard + }; + + public: + explicit TStringPattern(EPatternType ePatternType = EPatternType::eType_Wildcard); + explicit TStringPattern(const string::TString& strPattern, EPatternType ePatternType = EPatternType::eType_Wildcard); + + void SetPattern(const string::TString& strPattern, EPatternType ePatternType = EPatternType::eType_Wildcard); + bool Matches(const string::TString& strTextToMatch) const; + + EPatternType GetPatternType() const { return m_ePatternType; } + string::TString GetPattern() const { return m_strPattern; } + + // string parsing + static TStringPattern CreateFromString(const string::TString& strPattern, EPatternType eDefaultPatternType = EPatternType::eType_Wildcard); + + void FromString(const string::TString& strPattern, EPatternType eDefaultPatternType = EPatternType::eType_Wildcard); + string::TString ToString() const; + + bool operator==(const TStringPattern& rSrc) const; + bool operator!=(const TStringPattern& rSrc) const; + + private: + bool MatchMask(LPCTSTR lpszMask, LPCTSTR lpszString) const; + bool Scan(LPCTSTR& lpszMask, LPCTSTR& lpszString) const; + + private: + string::TString m_strPattern; + EPatternType m_ePatternType; + }; +} Fisheye: tag fadd6c9c628de875716d96c3a497b5bc6c8dca8a is not in file src/libchcore/TStringPatternArray.cpp Fisheye: Tag 22c7d5559ca17c9b1859d2283b667516b23ac597 refers to a dead (removed) revision in file `src/libstring/TStringPatternArray.cpp'. Fisheye: No comparison available. Pass `N' to diff? Index: src/libchcore/TStringPatternArray.h =================================================================== diff -u --- src/libchcore/TStringPatternArray.h (revision 0) +++ src/libchcore/TStringPatternArray.h (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -0,0 +1,55 @@ +// ============================================================================ +// Copyright (C) 2001-2020 by Jozef Starosczyk +// ixen {at} copyhandler [dot] com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#pragma once + +#include "TStringPattern.h" +#include "../common/GenericTemplates/RandomAccessIterators.h" +#include "../common/GenericTemplates/RandomAccessContainerWrapper.h" + +namespace chcore +{ + template class LIBCHCORE_API RandomAccessIteratorWrapper; + class LIBCHCORE_API TStringPatternArrayIterator : public RandomAccessIteratorWrapper + { + }; + + template class LIBCHCORE_API RandomAccessConstIteratorWrapper; + class LIBCHCORE_API TStringPatternArrayConstIterator : public RandomAccessConstIteratorWrapper + { + }; + + template class LIBCHCORE_API RandomAccessContainerWrapper; + + class LIBCHCORE_API TStringPatternArray : public RandomAccessContainerWrapper + { + public: + // pattern api + bool MatchesAny(const string::TString& strTextToMatch) const; + bool MatchesAll(const string::TString& strTextToMatch) const; + + // string parsing + void FromString(const string::TString& strPatterns, TStringPattern::EPatternType eDefaultPatternType = TStringPattern::EPatternType::eType_Wildcard); + void FromStringArray(const string::TStringArray& strPatterns, TStringPattern::EPatternType eDefaultPatternType = TStringPattern::EPatternType::eType_Wildcard); + string::TString ToString() const; + + // serialization + void FromSerializedStringArray(const string::TStringArray& arrSerializedPatterns); + string::TStringArray ToSerializedStringArray() const; + }; +} Fisheye: Tag 0d5b67ee96b435d63f7bf075dc8e28603793b187 refers to a dead (removed) revision in file `src/libchcore/Tests/TestsTStringPattern.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 22c7d5559ca17c9b1859d2283b667516b23ac597 refers to a dead (removed) revision in file `src/libstring/Tests/TestsTStringPattern.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: tag 07f5ed57f11f0b908313f692fc4830401f0db552 is not in file src/libchcore/Tests/TestsTStringPatternArray.cpp Fisheye: Tag 22c7d5559ca17c9b1859d2283b667516b23ac597 refers to a dead (removed) revision in file `src/libstring/Tests/TestsTStringPatternArray.cpp'. Fisheye: No comparison available. Pass `N' to diff? Index: src/libchcore/libchcore.vc140.vcxproj =================================================================== diff -u -r2dea2d82eb5c11d9e92d42e47f876e58c4505c4b -r22c7d5559ca17c9b1859d2283b667516b23ac597 --- src/libchcore/libchcore.vc140.vcxproj (.../libchcore.vc140.vcxproj) (revision 2dea2d82eb5c11d9e92d42e47f876e58c4505c4b) +++ src/libchcore/libchcore.vc140.vcxproj (.../libchcore.vc140.vcxproj) (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -519,6 +519,8 @@ + + @@ -591,6 +593,18 @@ true true + + true + true + true + true + + + true + true + true + true + true true @@ -611,6 +625,8 @@ + + Index: src/libchcore/libchcore.vc140.vcxproj.filters =================================================================== diff -u -r301444777085263aae7aff911dd56722f302597e -r22c7d5559ca17c9b1859d2283b667516b23ac597 --- src/libchcore/libchcore.vc140.vcxproj.filters (.../libchcore.vc140.vcxproj.filters) (revision 301444777085263aae7aff911dd56722f302597e) +++ src/libchcore/libchcore.vc140.vcxproj.filters (.../libchcore.vc140.vcxproj.filters) (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -105,6 +105,12 @@ Tests + + Source Files\Tools + + + Source Files\Tools + @@ -188,6 +194,18 @@ Tests + + Source Files\Tools + + + Source Files\Tools + + + Tests + + + Tests + Index: src/libchengine/FeedbackAlreadyExistsRule.cpp =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -r22c7d5559ca17c9b1859d2283b667516b23ac597 --- src/libchengine/FeedbackAlreadyExistsRule.cpp (.../FeedbackAlreadyExistsRule.cpp) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/libchengine/FeedbackAlreadyExistsRule.cpp (.../FeedbackAlreadyExistsRule.cpp) (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -5,6 +5,7 @@ using namespace serializer; using namespace string; +using namespace chcore; namespace chengine { Index: src/libchengine/FeedbackAlreadyExistsRule.h =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -r22c7d5559ca17c9b1859d2283b667516b23ac597 --- src/libchengine/FeedbackAlreadyExistsRule.h (.../FeedbackAlreadyExistsRule.h) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/libchengine/FeedbackAlreadyExistsRule.h (.../FeedbackAlreadyExistsRule.h) (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -2,7 +2,7 @@ #include "libchengine.h" #include "../libserializer/SerializableObject.h" -#include "../libstring/TStringPatternArray.h" +#include "../libchcore/TStringPatternArray.h" #include "ECompareType.h" #include "EFeedbackResult.h" #include "../libserializer/SerializerDataTypes.h" @@ -89,9 +89,9 @@ private: serializer::TSharedModificationTracker m_bUseMask; - serializer::TSharedModificationTracker m_spaMask; + serializer::TSharedModificationTracker m_spaMask; serializer::TSharedModificationTracker m_bUseExcludeMask; - serializer::TSharedModificationTracker m_spaExcludeMask; + serializer::TSharedModificationTracker m_spaExcludeMask; serializer::TSharedModificationTracker m_bUseDateCompare; serializer::TSharedModificationTracker m_cmpLastModified; Index: src/libchengine/FeedbackErrorRule.h =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -r22c7d5559ca17c9b1859d2283b667516b23ac597 --- src/libchengine/FeedbackErrorRule.h (.../FeedbackErrorRule.h) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/libchengine/FeedbackErrorRule.h (.../FeedbackErrorRule.h) (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -2,7 +2,7 @@ #include "libchengine.h" #include "../libserializer/SerializableObject.h" -#include "../libstring/TStringPatternArray.h" +#include "../libchcore/TStringPatternArray.h" #include "ECompareType.h" #include "EFeedbackResult.h" #include "../libserializer/SerializerDataTypes.h" @@ -88,9 +88,9 @@ private: serializer::TSharedModificationTracker m_bUseMask; - serializer::TSharedModificationTracker m_spaMask; + serializer::TSharedModificationTracker m_spaMask; serializer::TSharedModificationTracker m_bUseExcludeMask; - serializer::TSharedModificationTracker m_spaExcludeMask; + serializer::TSharedModificationTracker m_spaExcludeMask; serializer::TSharedModificationTracker m_bUseErrorType; serializer::TSharedModificationTracker m_eErrorType; Index: src/libchengine/FeedbackNotEnoughSpaceRule.h =================================================================== diff -u -re6f64ea0eecaf86dfa1a42c80604d227b69be768 -r22c7d5559ca17c9b1859d2283b667516b23ac597 --- src/libchengine/FeedbackNotEnoughSpaceRule.h (.../FeedbackNotEnoughSpaceRule.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) +++ src/libchengine/FeedbackNotEnoughSpaceRule.h (.../FeedbackNotEnoughSpaceRule.h) (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -2,7 +2,7 @@ #include "libchengine.h" #include "../libserializer/SerializableObject.h" -#include "../libstring/TStringPatternArray.h" +#include "../libchcore/TStringPatternArray.h" #include "ECompareType.h" #include "EFeedbackResult.h" #include "../libserializer/SerializerDataTypes.h" @@ -74,9 +74,9 @@ private: serializer::TSharedModificationTracker m_bUseMask; - serializer::TSharedModificationTracker m_spaMask; + serializer::TSharedModificationTracker m_spaMask; serializer::TSharedModificationTracker m_bUseExcludeMask; - serializer::TSharedModificationTracker m_spaExcludeMask; + serializer::TSharedModificationTracker m_spaExcludeMask; serializer::TSharedModificationTracker m_eResult; }; Index: src/libchengine/FeedbackOperationEventRule.h =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -r22c7d5559ca17c9b1859d2283b667516b23ac597 --- src/libchengine/FeedbackOperationEventRule.h (.../FeedbackOperationEventRule.h) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/libchengine/FeedbackOperationEventRule.h (.../FeedbackOperationEventRule.h) (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -2,7 +2,7 @@ #include "libchengine.h" #include "../libserializer/SerializableObject.h" -#include "../libstring/TStringPatternArray.h" +#include "../libchcore/TStringPatternArray.h" #include "ECompareType.h" #include "EFeedbackResult.h" #include "../libserializer/SerializerDataTypes.h" Index: src/libchengine/TFileFilter.cpp =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -r22c7d5559ca17c9b1859d2283b667516b23ac597 --- src/libchengine/TFileFilter.cpp (.../TFileFilter.cpp) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/libchengine/TFileFilter.cpp (.../TFileFilter.cpp) (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -1,21 +1,21 @@ -/*************************************************************************** -* Copyright (C) 2001-2008 by Jozef Starosczyk * -* ixen@copyhandler.com * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU Library General Public License * -* (version 2) as published by the Free Software Foundation; * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ +// ============================================================================ +// Copyright (C) 2001-2020 by Jozef Starosczyk +// ixen {at} copyhandler [dot] com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ #include "stdafx.h" #include "TFileFilter.h" #include "TFileInfo.h" Index: src/libchengine/TFileFilter.h =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -r22c7d5559ca17c9b1859d2283b667516b23ac597 --- src/libchengine/TFileFilter.h (.../TFileFilter.h) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/libchengine/TFileFilter.h (.../TFileFilter.h) (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -1,28 +1,27 @@ -/*************************************************************************** - * Copyright (C) 2001-2008 by Jozef Starosczyk * - * ixen@copyhandler.com * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License * - * (version 2) as published by the Free Software Foundation; * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ -#ifndef __TFILEFILTER_H__ -#define __TFILEFILTER_H__ +// ============================================================================ +// Copyright (C) 2001-2020 by Jozef Starosczyk +// ixen {at} copyhandler [dot] com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#pragma once #include #include "TDateTime.h" #include -#include "../libstring/TStringPatternArray.h" +#include "../libchcore/TStringPatternArray.h" #include "../libserializer/TSharedModificationTracker.h" #include "ECompareType.h" #include "../libserializer/SerializableObject.h" @@ -199,11 +198,11 @@ // files mask serializer::TSharedModificationTracker m_bUseMask; - serializer::TSharedModificationTracker m_astrMask; + serializer::TSharedModificationTracker m_astrMask; // files mask- serializer::TSharedModificationTracker m_bUseExcludeMask; - serializer::TSharedModificationTracker m_astrExcludeMask; + serializer::TSharedModificationTracker m_astrExcludeMask; // size filtering serializer::TSharedModificationTracker m_bUseSize1; @@ -241,5 +240,3 @@ }; #pragma warning(pop) } - -#endif Index: src/libstring/libstring.vcxproj =================================================================== diff -u -r2dea2d82eb5c11d9e92d42e47f876e58c4505c4b -r22c7d5559ca17c9b1859d2283b667516b23ac597 --- src/libstring/libstring.vcxproj (.../libstring.vcxproj) (revision 2dea2d82eb5c11d9e92d42e47f876e58c4505c4b) +++ src/libstring/libstring.vcxproj (.../libstring.vcxproj) (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -501,8 +501,6 @@ - - @@ -536,27 +534,13 @@ true true - - true - true - true - true - - - true - true - true - true - true true true true - - Index: src/libstring/libstring.vcxproj.filters =================================================================== diff -u -rfadd6c9c628de875716d96c3a497b5bc6c8dca8a -r22c7d5559ca17c9b1859d2283b667516b23ac597 --- src/libstring/libstring.vcxproj.filters (.../libstring.vcxproj.filters) (revision fadd6c9c628de875716d96c3a497b5bc6c8dca8a) +++ src/libstring/libstring.vcxproj.filters (.../libstring.vcxproj.filters) (revision 22c7d5559ca17c9b1859d2283b667516b23ac597) @@ -38,12 +38,6 @@ Source Files\Tools - - Source Files\Tools - - - Source Files\Tools - @@ -71,18 +65,6 @@ Tests - - Source Files\Tools - - - Source Files\Tools - - - Tests - - - Tests - Tests