Rhino C++ API  8.14
Public Member Functions | Public Attributes | List of all members
CRhinoRecordHistoryCommandOptionHelper Class Reference

#include <rhinoSdkObjectHistory.h>

Public Member Functions

 CRhinoRecordHistoryCommandOptionHelper ()
 
 ~CRhinoRecordHistoryCommandOptionHelper ()
 
int AddRecordHistoryCommandOption (CRhinoGet *getter)
 

Public Attributes

bool m_bRecordHistoryOptionValue
 Current value of RecordHistory command option. More...
 
const bool m_bSavedEnableHistoryRecording
 

Detailed Description

Command instance specific history recording support. Description: This allows the global history recording option to be optionally turned on or off for this single instance of the command execution. When command execution terminates the initial setting of History Recording is restored. The option is implemented by a command line toggle option. The option is allowed if and only if command specific history recording is enabled.

Constructor & Destructor Documentation

◆ CRhinoRecordHistoryCommandOptionHelper()

CRhinoRecordHistoryCommandOptionHelper::CRhinoRecordHistoryCommandOptionHelper ( )

Description: The constructor saves the value of RhinoHistoryManager()->HistoryRecordingEnabled() in m_bSavedEnableHistoryRecording and sets m_bShowHistoryRecordOption = m_bDefaultShowHistoryRecordOption;

◆ ~CRhinoRecordHistoryCommandOptionHelper()

CRhinoRecordHistoryCommandOptionHelper::~CRhinoRecordHistoryCommandOptionHelper ( )

Description: The destructor calls RhinoHistoryManager()->EnableHistoryRecording(m_bSavedEnableHistoryRecording)

Member Function Documentation

◆ AddRecordHistoryCommandOption()

int CRhinoRecordHistoryCommandOptionHelper::AddRecordHistoryCommandOption ( CRhinoGet getter)

Description: Adds a RecordHistory=yes/no command line option. The value of the option is in m_bRecordHistoryOptionValue. Parameters: getter - [in] Returns: option index (-1 if option is not added) Remark: If m_bShowHistoryRecordOption is false, then not option is added. This provides an easy way to get rid of the command option by changing a single bool.

Member Data Documentation

◆ m_bRecordHistoryOptionValue

bool CRhinoRecordHistoryCommandOptionHelper::m_bRecordHistoryOptionValue

Current value of RecordHistory command option.

◆ m_bSavedEnableHistoryRecording

const bool CRhinoRecordHistoryCommandOptionHelper::m_bSavedEnableHistoryRecording

Value of RhinoHistoryManager()->HistoryRecordingEnabled() when constructor was run.