Rhino C++ API  8.8
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CRhinoIniProfileContext Class Reference

#include <rhinoSdkUiProfileContext.h>

Inheritance diagram for CRhinoIniProfileContext:
CRhinoProfileContext

Public Member Functions

 CRhinoIniProfileContext (CRhinoProfileContext::context_location ct)
 
virtual ~CRhinoIniProfileContext ()
 
CRhinoProfileContextIteratorGetNewIterator (const wchar_t *section) override
 
const wchar_t * IniFileName () const
 
bool LoadProfileMultiString (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_ClassArray< ON_String > &) const override
 
bool LoadProfileMultiString (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_ClassArray< ON_wString > &) const override
 
bool LoadProfileString (const wchar_t *lpszSection, const wchar_t *lpszEntry, char *, int) const override
 
bool LoadProfileString (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_String &) const override
 
bool LoadProfileString (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_wString &) const override
 
bool LoadProfileString (const wchar_t *lpszSection, const wchar_t *lpszEntry, wchar_t *, int) const override
 
bool SaveProfileString (const wchar_t *lpszSection, const wchar_t *lpszEntry, const char *) const override
 
bool SaveProfileString (const wchar_t *lpszSection, const wchar_t *lpszEntry, const ON_ClassArray< ON_String > &) const override
 
bool SaveProfileString (const wchar_t *lpszSection, const wchar_t *lpszEntry, const ON_ClassArray< ON_wString > &) const override
 
bool SaveProfileString (const wchar_t *lpszSection, const wchar_t *lpszEntry, const wchar_t *) const override
 
void SetIniFileName (const wchar_t *)
 
- Public Member Functions inherited from CRhinoProfileContext
 CRhinoProfileContext (context_location ct)
 
virtual ~CRhinoProfileContext ()
 
virtual bool IsSynchronizing () const
 
virtual bool LoadProfile3dPoint (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_3dPoint *) const
 
virtual bool LoadProfile3dPoint (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_3dPoint *value, const ON_3dPoint &defaultValue) const
 
virtual bool LoadProfile3dVector (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_3dVector *) const
 
virtual bool LoadProfile3dVector (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_3dVector *value, const ON_3dVector &defaultValue) const
 
virtual bool LoadProfileBinary (const wchar_t *lpszSection, const wchar_t *lpszEntry, void *pValue, ULONG &nBytesOut) const
 
virtual bool LoadProfileBool (const wchar_t *lpszSection, const wchar_t *lpszEntry, bool *) const
 
virtual bool LoadProfileBool (const wchar_t *lpszSection, const wchar_t *lpszEntry, bool *value, bool defaultValue) const
 
virtual bool LoadProfileBool (const wchar_t *lpszSection, const wchar_t *lpszEntry, BOOL32 *) const
 
virtual bool LoadProfileBool (const wchar_t *lpszSection, const wchar_t *lpszEntry, BOOL32 *value, BOOL32 defaultValue) const
 
virtual bool LoadProfileColor (const wchar_t *lpszSection, const wchar_t *lpszEntry, COLORREF *) const
 
virtual bool LoadProfileColor (const wchar_t *lpszSection, const wchar_t *lpszEntry, COLORREF *value, COLORREF defaultValue) const
 
virtual bool LoadProfileDouble (const wchar_t *lpszSection, const wchar_t *lpszEntry, double *) const
 
virtual bool LoadProfileDouble (const wchar_t *lpszSection, const wchar_t *lpszEntry, double *value, double defaultValue) const
 
virtual bool LoadProfileInt (const wchar_t *lpszSection, const wchar_t *lpszEntry, int *) const
 
virtual bool LoadProfileInt (const wchar_t *lpszSection, const wchar_t *lpszEntry, int *value, int defaultValue) const
 
bool LoadProfileLegacyPlugMeshParameters (const wchar_t *lpszSection, const wchar_t *plugin_prefix, ON_MeshParameters *mp, int *mesh_ui_style) const
 
virtual bool LoadProfileMeshParameters (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_MeshParameters *) const
 
virtual bool LoadProfileMeshParameters (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_MeshParameters *value, const ON_MeshParameters &defaultValue) const
 
virtual bool LoadProfileMultiString (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_ClassArray< ON_String > &value, const ON_ClassArray< ON_String > &defaultValue) const
 
virtual bool LoadProfileMultiString (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_ClassArray< ON_wString > &value, const ON_ClassArray< ON_wString > &defaultValue) const
 
virtual bool LoadProfilePoint (const wchar_t *lpszSection, const wchar_t *lpszEntry, POINT *) const
 
virtual bool LoadProfilePoint (const wchar_t *lpszSection, const wchar_t *lpszEntry, POINT *value, const POINT &defaultValue) const
 
virtual bool LoadProfileRect (const wchar_t *lpszSection, const wchar_t *lpszEntry, RECT *) const
 
virtual bool LoadProfileRect (const wchar_t *lpszSection, const wchar_t *lpszEntry, RECT *value, const RECT &defaultValue) const
 
virtual bool LoadProfileRGBA (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_Color &) const
 
virtual bool LoadProfileRGBA (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_Color &value, const ON_Color &defaultValue) const
 
virtual bool LoadProfileString (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_String &value, const char *defaultValue) const
 
virtual bool LoadProfileString (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_wString &value, const wchar_t *defaultValue) const
 
virtual bool LoadProfileStringDictionary (const wchar_t *lpszSection, const wchar_t *lpszEntry, CRhinoStringDictionary &value) const
 
virtual bool LoadProfileStringDictionary (const wchar_t *lpszSection, const wchar_t *lpszEntry, CRhinoStringDictionary &value, const CRhinoStringDictionary &defaultValue) const
 
virtual bool LoadProfileUuid (const wchar_t *lpszSection, const wchar_t *lpszEntry, UUID *) const
 
virtual bool LoadProfileUuid (const wchar_t *lpszSection, const wchar_t *lpszEntry, UUID *value, const UUID &defaultValue) const
 
virtual bool LoadProfileXform (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_Xform *) const
 
virtual bool LoadProfileXform (const wchar_t *lpszSection, const wchar_t *lpszEntry, ON_Xform *value, const ON_Xform &defaultValue) const
 
context_location ProfileContextLocation () const
 
virtual void SaveProfile3dPoint (const wchar_t *lpszSection, const wchar_t *lpszEntry, const ON_3dPoint &) const
 
virtual void SaveProfile3dVector (const wchar_t *lpszSection, const wchar_t *lpszEntry, const ON_3dVector &) const
 
virtual bool SaveProfileBinary (const wchar_t *lpszSection, const wchar_t *lpszEntry, const void *pValue, ULONG nBytes) const
 
virtual void SaveProfileBool (const wchar_t *lpszSection, const wchar_t *lpszEntry, bool) const
 
virtual void SaveProfileBool (const wchar_t *lpszSection, const wchar_t *lpszEntry, BOOL32) const
 
virtual void SaveProfileColor (const wchar_t *lpszSection, const wchar_t *lpszEntry, COLORREF) const
 
virtual void SaveProfileDouble (const wchar_t *lpszSection, const wchar_t *lpszEntry, double) const
 
virtual void SaveProfileInt (const wchar_t *lpszSection, const wchar_t *lpszEntry, int) const
 
void SaveProfileLegacyPlugInMeshParameters (const wchar_t *lpszSection, const wchar_t *plugin_prefix, const ON_MeshParameters &mp, int mesh_ui_style) const
 
virtual void SaveProfileMeshParameters (const wchar_t *lpszSection, const wchar_t *lpszEntry, const ON_MeshParameters &) const
 
virtual void SaveProfilePoint (const wchar_t *lpszSection, const wchar_t *lpszEntry, const ON_2iPoint &) const
 
virtual void SaveProfilePoint (const wchar_t *lpszSection, const wchar_t *lpszEntry, const POINT &) const
 
virtual void SaveProfileRect (const wchar_t *lpszSection, const wchar_t *lpszEntry, const ON_4iRect &) const
 
virtual void SaveProfileRect (const wchar_t *lpszSection, const wchar_t *lpszEntry, const RECT &) const
 
virtual void SaveProfileRGBA (const wchar_t *lpszSection, const wchar_t *lpszEntry, const ON_Color &) const
 
virtual bool SaveProfileStringDictioary (const wchar_t *lpszSection, const wchar_t *lpszEntry, const CRhinoStringDictionary &value) const
 
virtual bool SaveProfileUuid (const wchar_t *lpszSection, const wchar_t *lpszEntry, const UUID &uuid) const
 
virtual void SaveProfileXform (const wchar_t *lpszSection, const wchar_t *lpszEntry, const ON_Xform &) const
 

Protected Member Functions

virtual bool IniWriteProfileString (const wchar_t *lpszSection, const wchar_t *lpszEntry, const ON_wString &sValue, CRhinoProfileContext::context_location nProfile) const
 

Protected Attributes

ON_wString m_wFileName
 

Additional Inherited Members

- Public Types inherited from CRhinoProfileContext
enum  context_location : unsigned int {
  cl_global_current_user = 0, cl_scheme_current_user, cl_root_local_machine, cl_plugins_current_user,
  cl_plugins_local_machine
}
 

Detailed Description

class CRhinoIniProfileContext

Note: You must call SetIniFileName() with a valid INI file name or all other methods will fail.

Constructor & Destructor Documentation

◆ CRhinoIniProfileContext()

CRhinoIniProfileContext::CRhinoIniProfileContext ( CRhinoProfileContext::context_location  ct)

◆ ~CRhinoIniProfileContext()

virtual CRhinoIniProfileContext::~CRhinoIniProfileContext ( )
virtual

Member Function Documentation

◆ GetNewIterator()

CRhinoProfileContextIterator* CRhinoIniProfileContext::GetNewIterator ( const wchar_t *  section)
overridevirtual

Required CRhinoProfileContext overrides

Implements CRhinoProfileContext.

◆ IniFileName()

const wchar_t* CRhinoIniProfileContext::IniFileName ( ) const

Local public methods

◆ IniWriteProfileString()

virtual bool CRhinoIniProfileContext::IniWriteProfileString ( const wchar_t *  lpszSection,
const wchar_t *  lpszEntry,
const ON_wString sValue,
CRhinoProfileContext::context_location  nProfile 
) const
protectedvirtual

Local protected methods

◆ LoadProfileMultiString() [1/2]

bool CRhinoIniProfileContext::LoadProfileMultiString ( const wchar_t *  lpszSection,
const wchar_t *  lpszEntry,
ON_ClassArray< ON_String > &   
) const
overridevirtual

Optional CRhinoProfileContext overrides

Reimplemented from CRhinoProfileContext.

◆ LoadProfileMultiString() [2/2]

bool CRhinoIniProfileContext::LoadProfileMultiString ( const wchar_t *  lpszSection,
const wchar_t *  lpszEntry,
ON_ClassArray< ON_wString > &   
) const
overridevirtual

Reimplemented from CRhinoProfileContext.

◆ LoadProfileString() [1/4]

bool CRhinoIniProfileContext::LoadProfileString ( const wchar_t *  lpszSection,
const wchar_t *  lpszEntry,
char *  ,
int   
) const
overridevirtual

When you override the LoadProfileString(...) above the compiler can not find the other overloaded methods so you must override them and call the base class

Reimplemented from CRhinoProfileContext.

◆ LoadProfileString() [2/4]

bool CRhinoIniProfileContext::LoadProfileString ( const wchar_t *  lpszSection,
const wchar_t *  lpszEntry,
ON_String  
) const
overridevirtual

Reimplemented from CRhinoProfileContext.

◆ LoadProfileString() [3/4]

bool CRhinoIniProfileContext::LoadProfileString ( const wchar_t *  lpszSection,
const wchar_t *  lpszEntry,
ON_wString  
) const
overridevirtual

All the LoadProfile* functions eventually call this LoadProfileString(...,CString&) member. You MUST override the following method. When you override the SaveProfileString(...) above the compiler can not find the other overloaded methods so at a minimum you must override them and call the base class

Implements CRhinoProfileContext.

◆ LoadProfileString() [4/4]

bool CRhinoIniProfileContext::LoadProfileString ( const wchar_t *  lpszSection,
const wchar_t *  lpszEntry,
wchar_t *  ,
int   
) const
overridevirtual

Reimplemented from CRhinoProfileContext.

◆ SaveProfileString() [1/4]

bool CRhinoIniProfileContext::SaveProfileString ( const wchar_t *  lpszSection,
const wchar_t *  lpszEntry,
const char *   
) const
overridevirtual

The SaveProfile*() functions write to strings to the desired output location. You must derive a class from CRhinoProfileContext and provide this method. The LoadProfile*() functions return TRUE if the requested entry is found and is valid.

NOTE: Never apply localization to the lpszSection and lpszEntry parameters. The lpszSection and lpszEntry parameters are one of the few situations in the Rhino core where we must use const wchar_t* types instead of wchar_t*.

All lpszSection and lpszEntry parameters in core Rhino used symbols from the ASCII character set. Plug-in developers who want to avoid localization and UNICODE vs MBCS issues are encouraged to adopt the same ASCII approach.

All the SaveProfile* functions eventually call one of these SaveProfileString() members. You MUST override the first two methods. When you override the SaveProfileString(...) above the compiler can not find the other overloaded methods so at a minimum you must override them and call the base class

Implements CRhinoProfileContext.

◆ SaveProfileString() [2/4]

bool CRhinoIniProfileContext::SaveProfileString ( const wchar_t *  lpszSection,
const wchar_t *  lpszEntry,
const ON_ClassArray< ON_String > &   
) const
overridevirtual

When you override the SaveProfileString(...) above the compiler can not find the other overloaded methods so you must override them, INI overrides them anyhow and uses a number decoration scheme to save lists of strings

Reimplemented from CRhinoProfileContext.

◆ SaveProfileString() [3/4]

bool CRhinoIniProfileContext::SaveProfileString ( const wchar_t *  lpszSection,
const wchar_t *  lpszEntry,
const ON_ClassArray< ON_wString > &   
) const
overridevirtual

Reimplemented from CRhinoProfileContext.

◆ SaveProfileString() [4/4]

bool CRhinoIniProfileContext::SaveProfileString ( const wchar_t *  lpszSection,
const wchar_t *  lpszEntry,
const wchar_t *   
) const
overridevirtual

Implements CRhinoProfileContext.

◆ SetIniFileName()

void CRhinoIniProfileContext::SetIniFileName ( const wchar_t *  )

Member Data Documentation

◆ m_wFileName

ON_wString CRhinoIniProfileContext::m_wFileName
protected