Rhino C++ API  8.14
Public Member Functions | Friends | List of all members
CRhinoHistory Class Reference

#include <rhinoSdkCommand.h>

Public Member Functions

 CRhinoHistory (const class CRhinoHistoryRecord &)
 
 CRhinoHistory (const CRhinoCommand &)
 
 CRhinoHistory (const CRhinoHistory &)
 
 CRhinoHistory (ON_HistoryRecord *&)
 
 ~CRhinoHistory ()
 
bool CopyOnReplaceObject () const
 
CRhinoHistoryoperator= (const CRhinoHistory &)
 
bool SetBoolValue (int value_id, bool b)
 
bool SetBoolValues (int value_id, int count, const bool *b)
 
bool SetBrepValue (int value_id, const ON_Brep &brep)
 
bool SetColorValue (int value_id, ON_Color c)
 
bool SetColorValues (int value_id, int count, const ON_Color *c)
 
bool SetCommand (const CRhinoCommand &cmd)
 
bool SetCopyOnReplaceObject (bool bCopyOnReplaceObject)
 
bool SetCurveValue (int value_id, const ON_Curve &curve)
 
bool SetDoubleValue (int value_id, double x)
 
bool SetDoubleValues (int value_id, int count, const double *x)
 
bool SetGeometryValue (int value_id, ON_Geometry *g)
 
bool SetGeometryValues (int value_id, const ON_SimpleArray< ON_Geometry * > a)
 
bool SetHistoryVersion (int history_version)
 
bool SetIntValue (int value_id, int i)
 
bool SetIntValues (int value_id, int count, const int *i)
 
bool SetMeshValue (int value_id, const ON_Mesh &mesh)
 
bool SetObjRefValue (int value_id, const class CRhinoObjRef &objref)
 
bool SetObjRefValues (int value_id, int count, const class CRhinoObjRef *objref)
 
bool SetPointOnObjectValue (int value_id, const class CRhinoObjRef &objref, ON_3dPoint point)
 
bool SetPointValue (int value_id, ON_3dPoint p)
 
bool SetPointValues (int value_id, int count, const ON_3dPoint *P)
 
bool SetPolyEdgeValue (CRhinoDoc &doc, int value_id, const class CRhinoPolyEdge &polyedge)
 
bool SetPolyEdgeValues (CRhinoDoc &doc, int value_id, int count, const class CRhinoPolyEdge *const *polyedges)
 
bool SetStringValue (int value_id, const wchar_t *s)
 
bool SetStringValues (int value_id, const ON_ClassArray< ON_wString > &s)
 
bool SetStringValues (int value_id, int count, const wchar_t *const *s)
 
bool SetSubDEdgeChainValue (int value_id, const ON_SubDEdgeChain &subd_edge_chain)
 
bool SetSubDEdgeChainValues (int value_id, const ON_SimpleArray< const ON_SubDEdgeChain * > &a)
 
bool SetSurfaceValue (int value_id, const ON_Surface &surface)
 
bool SetUuidValue (int value_id, ON_UUID uuid)
 
bool SetUuidValues (int value_id, int count, const ON_UUID *u)
 
bool SetVectorValue (int value_id, ON_3dVector v)
 
bool SetVectorValues (int value_id, int count, const ON_3dVector *V)
 
bool SetXformValue (int value_id, ON_Xform xform)
 
bool SetXformValues (int value_id, int count, const ON_Xform *xform)
 

Friends

class CRhinoHistoryRecordTable
 

Detailed Description

CRhinoHistory simply manages a pointer to an ON_HistoryRecord and frees command developers from having to carefully create the CRhinoHistoryRecord pointer in a way that never leaks memory.

Constructor & Destructor Documentation

◆ ~CRhinoHistory()

CRhinoHistory::~CRhinoHistory ( )

◆ CRhinoHistory() [1/4]

CRhinoHistory::CRhinoHistory ( const CRhinoHistory )

◆ CRhinoHistory() [2/4]

CRhinoHistory::CRhinoHistory ( const CRhinoCommand )

◆ CRhinoHistory() [3/4]

CRhinoHistory::CRhinoHistory ( const class CRhinoHistoryRecord )

◆ CRhinoHistory() [4/4]

CRhinoHistory::CRhinoHistory ( ON_HistoryRecord *&  )

Member Function Documentation

◆ CopyOnReplaceObject()

bool CRhinoHistory::CopyOnReplaceObject ( ) const

12 May, 2015 - Lowell When an object is replaced and the old object has a history record with this field set, the history record is copied and attached to the new object. That allows a descendant object to continue the history linkage after it is edited. See http://mcneel.myjetbrains.com/youtrack/issue/RH-30399

◆ operator=()

CRhinoHistory& CRhinoHistory::operator= ( const CRhinoHistory )

◆ SetBoolValue()

bool CRhinoHistory::SetBoolValue ( int  value_id,
bool  b 
)

Description: For setting values when commands are creating history records. Parameters: value_id - [in] If there a value with the same input id exists, the old value is replaced. count - [in] Number of values b - [in] array of count bools i - [in] array of count ints x - [in] array of count doubles p - [in] array of count 3d points v - [in] array of count 3d vectors xform - [in] array of count xforms c - [in] array of count colors or - [in] array of count object references g - [in] array of count geometry pointers u - [in] array of uuids s - [in] string

◆ SetBoolValues()

bool CRhinoHistory::SetBoolValues ( int  value_id,
int  count,
const bool *  b 
)

Description: For setting values when commands are creating history records. Parameters: value_id - [in] If there a value with the same input id exists, the old value is replaced. count - [in] Number of values b - [in] array of count bools i - [in] array of count ints x - [in] array of count doubles P - [in] array of count 3d points V - [in] array of count 3d vectors xform - [in] array of count xforms c - [in] array of count colors or - [in] array of count object references g - [in] array of count geometry pointers u - [in] array of uuids s - [in] array of strings

◆ SetBrepValue()

bool CRhinoHistory::SetBrepValue ( int  value_id,
const ON_Brep brep 
)

◆ SetColorValue()

bool CRhinoHistory::SetColorValue ( int  value_id,
ON_Color  c 
)

◆ SetColorValues()

bool CRhinoHistory::SetColorValues ( int  value_id,
int  count,
const ON_Color c 
)

◆ SetCommand()

bool CRhinoHistory::SetCommand ( const CRhinoCommand cmd)

Description: Set the command whos ReplayHistory override will be used to update the command's output objects if an input changes. Parameters: cmd - [in] Remarks: You can either set the command by passing it to the constructor or by using this function.

◆ SetCopyOnReplaceObject()

bool CRhinoHistory::SetCopyOnReplaceObject ( bool  bCopyOnReplaceObject)

Returns: True if successful. False if m_hr is nullptr and the value could not be set.

◆ SetCurveValue()

bool CRhinoHistory::SetCurveValue ( int  value_id,
const ON_Curve curve 
)

◆ SetDoubleValue()

bool CRhinoHistory::SetDoubleValue ( int  value_id,
double  x 
)

◆ SetDoubleValues()

bool CRhinoHistory::SetDoubleValues ( int  value_id,
int  count,
const double *  x 
)

◆ SetGeometryValue()

bool CRhinoHistory::SetGeometryValue ( int  value_id,
ON_Geometry g 
)

◆ SetGeometryValues()

bool CRhinoHistory::SetGeometryValues ( int  value_id,
const ON_SimpleArray< ON_Geometry * >  a 
)

◆ SetHistoryVersion()

bool CRhinoHistory::SetHistoryVersion ( int  history_version)

Description: Specify a non-zero integer that identifies the version of this history record. The virtual ReplayHistory() functions can check this version to avoid replaying history using information created by earlier versions of the command. Parameters: history_version - [in] any non-zero integer. It is strongly suggested that something like YYYYMMDD be used. Returns: True if successful.

◆ SetIntValue()

bool CRhinoHistory::SetIntValue ( int  value_id,
int  i 
)

◆ SetIntValues()

bool CRhinoHistory::SetIntValues ( int  value_id,
int  count,
const int *  i 
)

◆ SetMeshValue()

bool CRhinoHistory::SetMeshValue ( int  value_id,
const ON_Mesh mesh 
)

◆ SetObjRefValue()

bool CRhinoHistory::SetObjRefValue ( int  value_id,
const class CRhinoObjRef objref 
)

◆ SetObjRefValues()

bool CRhinoHistory::SetObjRefValues ( int  value_id,
int  count,
const class CRhinoObjRef objref 
)

◆ SetPointOnObjectValue()

bool CRhinoHistory::SetPointOnObjectValue ( int  value_id,
const class CRhinoObjRef objref,
ON_3dPoint  point 
)

◆ SetPointValue()

bool CRhinoHistory::SetPointValue ( int  value_id,
ON_3dPoint  p 
)

◆ SetPointValues()

bool CRhinoHistory::SetPointValues ( int  value_id,
int  count,
const ON_3dPoint P 
)

◆ SetPolyEdgeValue()

bool CRhinoHistory::SetPolyEdgeValue ( CRhinoDoc doc,
int  value_id,
const class CRhinoPolyEdge polyedge 
)

◆ SetPolyEdgeValues()

bool CRhinoHistory::SetPolyEdgeValues ( CRhinoDoc doc,
int  value_id,
int  count,
const class CRhinoPolyEdge *const *  polyedges 
)

◆ SetStringValue()

bool CRhinoHistory::SetStringValue ( int  value_id,
const wchar_t *  s 
)

◆ SetStringValues() [1/2]

bool CRhinoHistory::SetStringValues ( int  value_id,
const ON_ClassArray< ON_wString > &  s 
)

◆ SetStringValues() [2/2]

bool CRhinoHistory::SetStringValues ( int  value_id,
int  count,
const wchar_t *const *  s 
)

◆ SetSubDEdgeChainValue()

bool CRhinoHistory::SetSubDEdgeChainValue ( int  value_id,
const ON_SubDEdgeChain subd_edge_chain 
)

◆ SetSubDEdgeChainValues()

bool CRhinoHistory::SetSubDEdgeChainValues ( int  value_id,
const ON_SimpleArray< const ON_SubDEdgeChain * > &  a 
)

◆ SetSurfaceValue()

bool CRhinoHistory::SetSurfaceValue ( int  value_id,
const ON_Surface surface 
)

◆ SetUuidValue()

bool CRhinoHistory::SetUuidValue ( int  value_id,
ON_UUID  uuid 
)

◆ SetUuidValues()

bool CRhinoHistory::SetUuidValues ( int  value_id,
int  count,
const ON_UUID u 
)

◆ SetVectorValue()

bool CRhinoHistory::SetVectorValue ( int  value_id,
ON_3dVector  v 
)

◆ SetVectorValues()

bool CRhinoHistory::SetVectorValues ( int  value_id,
int  count,
const ON_3dVector V 
)

◆ SetXformValue()

bool CRhinoHistory::SetXformValue ( int  value_id,
ON_Xform  xform 
)

◆ SetXformValues()

bool CRhinoHistory::SetXformValues ( int  value_id,
int  count,
const ON_Xform xform 
)

Friends And Related Function Documentation

◆ CRhinoHistoryRecordTable

friend class CRhinoHistoryRecordTable
friend