/** * @file XTPSyntaxEditSectionManager.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPSYNTAXEDITSECTIONMANAGER_H__) # define __XTPSYNTAXEDITSECTIONMANAGER_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** @cond */ /** * struct: XTP_EDIT_SCHEMAFILEINFO */ struct _XTP_EXT_CLASS XTP_EDIT_SCHEMAFILEINFO { XTP_EDIT_SCHEMAFILEINFO(); XTP_EDIT_SCHEMAFILEINFO(const XTP_EDIT_SCHEMAFILEINFO& info); XTP_EDIT_SCHEMAFILEINFO(const CString& srcName, const CString& srcValue); const XTP_EDIT_SCHEMAFILEINFO& operator=(const XTP_EDIT_SCHEMAFILEINFO& info); BOOL operator==(const XTP_EDIT_SCHEMAFILEINFO& info) const; public: CString csName; CString csValue; CString csDesc; UINT uValue; }; /** * class: CXTPSyntaxEditSchemaFileInfoList */ class _XTP_EXT_CLASS CXTPSyntaxEditSchemaFileInfoList : public CList { public: POSITION LookupName(const CString& csName, XTP_EDIT_SCHEMAFILEINFO& info) const; POSITION LookupValue(const CString& csValue, XTP_EDIT_SCHEMAFILEINFO& info) const; POSITION LookupValue(const UINT& uValue, XTP_EDIT_SCHEMAFILEINFO& info) const; POSITION LookupDesc(const CString& csDesc, XTP_EDIT_SCHEMAFILEINFO& info) const; }; /** * class: CXTPSyntaxEditSectionManager */ class _XTP_EXT_CLASS CXTPSyntaxEditSectionManager { public: CXTPSyntaxEditSectionManager(); virtual ~CXTPSyntaxEditSectionManager(); public: // used for file based settings int GetSectionNames(CStringArray& arSections, LPCTSTR lpszFilePath) const; int GetSectionKeyList(CXTPSyntaxEditSchemaFileInfoList& infoList, LPCTSTR lpszFilePath, LPCTSTR lpszSectionName) const; // used for non-file based settings int GetSectionNames(CStringArray& arSections, CStringArray& arPassedString) const; int GetSectionKeyList(CXTPSyntaxEditSchemaFileInfoList& infoList, CStringArray& arPassedString, CString sSectionName) const; BOOL ParseSectionKey(XTP_EDIT_SCHEMAFILEINFO& info, const CString& csBuffer) const; BOOL SplitString(CString& csLeft, CString& csRight, const CString& csBuffer, TCHAR chSep) const; }; /** @endcond */ ////////////////////////////////////////////////////////////////////// # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSYNTAXEDITSECTIONMANAGER_H__) /** @endcond */