CommonObject
ReferencesNothing matches.
Base class for .NET classes that wrap C++ unmanaged Rhino classes.
Constructors
CommonObject
#Protected constructor for internal use.
Parameters:
| info (SerializationInfo) | Serialization data. |
| context (StreamingContext) | Serialization stream. |
Finalizer
~CommonObject
#~CommonObject()
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().
Properties
Indicates if this object has been disposed or the document it originally belonged to has been disposed.
Gets true if this class has any custom information attached to it through UserData.
If true this object may not be modified. Any properties or functions that attempt to modify this object when it is set to "IsReadOnly" will throw a NotSupportedException.
Used to test ON_Object* pointers to see if they are a brep or mesh that is corrupt enough to crash Rhino.
List of custom information that is attached to this class.
Dictionary of custom information attached to this class. The dictionary is actually user data provided as an easy to use shareable set of information.
Methods
Computes an estimate of the number of bytes that this object is using in memory.
Remarks: This is the same as calling GeometryBase.MemoryEstimate, but works for all CommonObject derived classes.
Parameters:
| obj (CommonObject) |
Returns: An estimated memory footprint.
ConstructConstObject
#Assigns a parent object and a sub-object index to this.
public void Dispose()
Actively reclaims unmanaged resources that this instance uses.
Dispose
#For derived class implementers.
This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.
You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.
Also, you must call the base virtual method within your overriding method.
Parameters:
| disposing (bool) | true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer. |
public void EnsurePrivateCopy()
If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.
Create a CommonObject instance from a Base64 encoded string. This is typically the values used when passing common objects around as JSON data
Create a CommonObject instance from a JSON dictionary
Parameters:
| jsonDictionary (Dictionary<string, string>) |
Create a CommonObject instance from a JSON string
Parameters:
| json (string) |
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
Parameters:
| info (SerializationInfo) | The System.Runtime.Serialization.SerializationInfo to populate with data. |
| context (StreamingContext) | The destination (see System.Runtime.Serialization.StreamingContext) for this serialization. |
Determines if an object is valid. Also provides a report on errors if this object happens not to be valid.
Parameters:
| log (out string) | A textual log. This out parameter is assigned during this call. |
Returns: true if this object is valid; false otherwise.
NonConstOperation
#protected virtual void NonConstOperation()
For derived classes implementers.
Defines the necessary implementation to free the instance from being constant.
OnSwitchToNonConst
#protected virtual void OnSwitchToNonConst()
Is called when a non-constant operation first occurs.
Create a JSON string representation of this object
Parameters:
| options (SerializationOptions) |