Rhino C++ API  8.13
Public Member Functions | List of all members
CRhinoSaveAndRestoreAppFileReadOptions Class Reference

#include <rhinoSdkFileOptions.h>

Public Member Functions

 CRhinoSaveAndRestoreAppFileReadOptions ()
 
 CRhinoSaveAndRestoreAppFileReadOptions (bool bSaveWhenConstructed)
 
 ~CRhinoSaveAndRestoreAppFileReadOptions ()
 
void Destroy ()
 
void Restore ()
 
void Save ()
 
const class CRhinoFileReadOptionsSavedFileReadOptions () const
 

Detailed Description

Description: Put a CRhinoSaveAndRestoreAppFileReadOptions on the stack when you want to save current CRhinoApp file read options, modify them for some use, and then restore them.

The default constructor saves the current settings at construction time. The destruction will restore any saved settings.

If you want more control over the time when saving and restoring happens, you may use the constrctor with a bool bSave parameter to control what happens at construction time and explicitly call Save, Restore and Destroy to manage the saved settings.

Constructor & Destructor Documentation

◆ CRhinoSaveAndRestoreAppFileReadOptions() [1/2]

CRhinoSaveAndRestoreAppFileReadOptions::CRhinoSaveAndRestoreAppFileReadOptions ( )

Description: The default constructor saves the current value of RhinoApp().FileReadOptions().

◆ CRhinoSaveAndRestoreAppFileReadOptions() [2/2]

CRhinoSaveAndRestoreAppFileReadOptions::CRhinoSaveAndRestoreAppFileReadOptions ( bool  bSaveWhenConstructed)

Parameters: bSaveWhenConstructed - [in] true: This constructor will save the current value of RhinoApp().FileReadOptions(). false: Constructs this with no saved settings.

◆ ~CRhinoSaveAndRestoreAppFileReadOptions()

CRhinoSaveAndRestoreAppFileReadOptions::~CRhinoSaveAndRestoreAppFileReadOptions ( )

Description: If there are saved settings, the destructor will use them to set the value of RhinoApp().FileReadOptions().

Member Function Documentation

◆ Destroy()

void CRhinoSaveAndRestoreAppFileReadOptions::Destroy ( )

Description: Destroy any currently saved settings without modifying the CRhinoApp().FileReadOptions() settings.

◆ Restore()

void CRhinoSaveAndRestoreAppFileReadOptions::Restore ( )

Description: If there are saved settings, Restore() will use them to set the value of RhinoApp().FileReadOptions() and then destroy the saved settings. Returns: True if there were settings to restore.

◆ Save()

void CRhinoSaveAndRestoreAppFileReadOptions::Save ( )

Description: Saves the current value CRhinoApp().FileReadOptions().

◆ SavedFileReadOptions()

const class CRhinoFileReadOptions* CRhinoSaveAndRestoreAppFileReadOptions::SavedFileReadOptions ( ) const

Returns: Settings currently saved in this class.