CGridListCtrlEx
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CViewConfigSectionDefault::CViewConfigSectionLocal Class Reference

Inner class that stores the default configuration in memory. More...

Inheritance diagram for CViewConfigSectionDefault::CViewConfigSectionLocal:
CViewConfigSection

Public Member Functions

 CViewConfigSectionLocal (const CString &strViewName)
 CViewConfigSectionLocal - Constructor. More...
 
 CViewConfigSectionLocal (const CViewConfigSectionLocal &other)
 CViewConfigSectionLocal - Copy constructor to ensure proper copy of m_LocalSettings. More...
 
CViewConfigSectionLocaloperator= (const CViewConfigSectionLocal &other)
 CViewConfigSectionLocal - Assignment operator to ensure proper assignment of m_LocalSettings. More...
 
bool HasSettings () const
 Contains default configuration. More...
 
void CopySettings (CViewConfigSection &destination) const
 Copy the default values to another persistence layer. More...
 
- Public Member Functions inherited from CViewConfigSection
 CViewConfigSection (const CString &strViewName)
 CViewConfigSection - Constructor. More...
 
virtual ~CViewConfigSection ()
 CViewConfigSection - Destructor.
 
virtual CString GetSetting (const CString &strName, const CString &strDefval=_T("")) const
 Retrieves a setting value for the view. More...
 
virtual bool GetBoolSetting (const CString &strName, bool bDefval=false) const
 Retrieves a bool setting value for the view. More...
 
virtual int GetIntSetting (const CString &strName, int nDefval=0) const
 Retrieves an integer setting value for the view. More...
 
virtual double GetFloatSetting (const CString &strName, double nDefval=0.0) const
 Retrieves a float setting value for the view. More...
 
virtual LOGFONT GetLogFontSetting (const CString &strName) const
 Retrieves a font setting value for the view. More...
 
virtual CRect GetRectSetting (const CString &strName, const CRect &rectDefval=CRect(0, 0, 0, 0)) const
 Retrieves a rectangle setting value for the view. More...
 
virtual COLORREF GetColorSetting (const CString &strName, const COLORREF colorDefval=RGB(0, 0, 0)) const
 Retrieves a color setting value for the view. More...
 
virtual void GetArraySetting (const CString &strName, CSimpleArray< CString > &values, const CString &strDelimiter=_T(", ")) const
 Retrieves a string-array setting value for the view. More...
 
virtual void GetArraySetting (const CString &strName, CSimpleArray< int > &values, const CString &strDelimiter=_T(", ")) const
 Retrieves a integer-array setting value for the view. More...
 
virtual void SetSetting (const CString &strName, const CString &strValue)
 Updates a setting value for the view. More...
 
virtual void SetBoolSetting (const CString &strName, bool bValue)
 Updates the value of a bool setting. More...
 
virtual void SetIntSetting (const CString &strName, int nValue)
 Updates the value of an integer setting. More...
 
virtual void SetFloatSetting (const CString &strName, double nValue, int nDecimals=6)
 Updates the value of a float setting. More...
 
virtual void SetArraySetting (const CString &strName, const CSimpleArray< CString > &values, const CString &strDelimiter=_T(", "))
 Updates the value of a string-array setting. More...
 
virtual void SetArraySetting (const CString &strName, const CSimpleArray< int > &values, const CString &strDelimiter=_T(", "))
 Updates the value of an integer-array setting. More...
 
virtual void SetLogFontSetting (const CString &strName, const LOGFONT &font)
 Updates the value of a font setting. More...
 
virtual void SetRectSetting (const CString &strName, const RECT &rect)
 Updates the value of a rectangle setting. More...
 
virtual void SetColorSetting (const CString &strName, COLORREF color)
 Updates the value of a color setting. More...
 
virtual void RemoveCurrentConfig ()
 Removes the current configuration.
 

Protected Member Functions

virtual CString ReadSetting (const CString &strSection, const CString &strName, const CString &strDefval) const
 Implements an interface for reading the setting value from memory. More...
 
virtual void WriteSetting (const CString &strSection, const CString &strName, const CString &strValue)
 Implements an interface for writing the setting value to memory. More...
 
virtual void RemoveSection (const CString &strSection)
 Implements an interface for removing the setting section from memory. More...
 
- Protected Member Functions inherited from CViewConfigSection
virtual CString ConvertBoolSetting (bool bValue) const
 Converts a bool setting to a string value. More...
 
virtual CString ConvertIntSetting (int nValue) const
 Converts an integer setting to a string value. More...
 
virtual CString ConvertFloatSetting (double nValue, int nDecimals=6) const
 Converts a float setting to a string value. More...
 
virtual CString ConvertArraySetting (const CSimpleArray< CString > &values, const CString &strDelimiter=_T(", ")) const
 Converts a string-array setting value into a delimited string. More...
 
virtual CString ConvertArraySetting (const CSimpleArray< int > &values, const CString &strDelimiter=_T(", ")) const
 Converts an integer-array setting value into a delimited string. More...
 
virtual CString ConvertLogFontSetting (const LOGFONT &font) const
 Converts a font setting value into a delimited string. More...
 
virtual CString ConvertRectSetting (const RECT &rect) const
 Converts a rectangle setting value into a delimited string. More...
 
virtual CString ConvertColorSetting (COLORREF color) const
 Converts a color setting value into a delimited string. More...
 
virtual void SplitArraySetting (const CString &strArray, CSimpleArray< CString > &values, const CString &strDelimiter=_T(", ")) const
 Splits a delimited string into a string-array. More...
 
virtual const CString & GetSectionName () const
 Retrieves the current section name to store the settings. More...
 

Protected Attributes

CSimpleMap< CString, CString > m_LocalSettings
 Default configuration.
 
- Protected Attributes inherited from CViewConfigSection
CString m_ViewName
 Configuration name used when persisting the state (Translates into a section name)
 

Detailed Description

Inner class that stores the default configuration in memory.

Constructor & Destructor Documentation

CViewConfigSectionDefault::CViewConfigSectionLocal::CViewConfigSectionLocal ( const CString &  strViewName)
explicit

CViewConfigSectionLocal - Constructor.

Parameters
strViewNameName to identify and persist the configuration
CViewConfigSectionDefault::CViewConfigSectionLocal::CViewConfigSectionLocal ( const CViewConfigSectionLocal other)

CViewConfigSectionLocal - Copy constructor to ensure proper copy of m_LocalSettings.

Member Function Documentation

void CViewConfigSectionDefault::CViewConfigSectionLocal::CopySettings ( CViewConfigSection destination) const

Copy the default values to another persistence layer.

Parameters
destinationThe other persistence layer
bool CViewConfigSectionDefault::CViewConfigSectionLocal::HasSettings ( ) const

Contains default configuration.

Returns
Default configuration available (true/false)
CViewConfigSectionDefault::CViewConfigSectionLocal & CViewConfigSectionDefault::CViewConfigSectionLocal::operator= ( const CViewConfigSectionLocal other)

CViewConfigSectionLocal - Assignment operator to ensure proper assignment of m_LocalSettings.

CString CViewConfigSectionDefault::CViewConfigSectionLocal::ReadSetting ( const CString &  strSection,
const CString &  strSetting,
const CString &  strDefval 
) const
protectedvirtual

Implements an interface for reading the setting value from memory.

Parameters
strSectionName of section
strSettingName of setting
strDefvalDefault value to return if no value was found
Returns
Value of the setting

Implements CViewConfigSection.

void CViewConfigSectionDefault::CViewConfigSectionLocal::RemoveSection ( const CString &  strSection)
protectedvirtual

Implements an interface for removing the setting section from memory.

Parameters
strSectionName of section

Implements CViewConfigSection.

void CViewConfigSectionDefault::CViewConfigSectionLocal::WriteSetting ( const CString &  strSection,
const CString &  strSetting,
const CString &  strValue 
)
protectedvirtual

Implements an interface for writing the setting value to memory.

Parameters
strSectionName of section
strSettingName of setting
strValueNew setting value

Implements CViewConfigSection.