Constructors

GH_Goo

#
protected GH_Goo()
Blank constructor, m_value will be set to default (null for reference types, zeroes for value types)

GH_Goo

#
protected GH_Goo(GH_Goo<T> other)
Copy constructor, copies the data from another GH_Goo(Of T) instance. Reference types will not be duplicated.
other (GH_Goo<T>)Goo instance to copy.

GH_Goo

#
protected GH_Goo(T internal_data)
Data constructor, m_value will be set to internal_data.
internal_data (T)Value to store inside this Goo instance.

Fields

m_value

#
protected T m_value

Properties

IsValid

#
public abstract bool IsValid { get; }
Gets a value indicating whether or not the current value is valid.
IsValid

IsValidWhyNot

#
public virtual string IsValidWhyNot { get; }
Gets a string describing the state of "invalidness". If the instance is valid, then this property should return Nothing or String.Empty.
IsValidWhyNot

TypeDescription

#
public abstract string TypeDescription { get; }
Gets a description of the type of the implementation.
TypeDescription

TypeName

#
public abstract string TypeName { get; }
Gets the name of the type of the implementation.
TypeName

Value

#
public virtual T Value { get; set; }
Gets or sets the internal data.

Methods

CastFrom

#
public virtual bool CastFrom(object source)
Attempt a cast from generic data.
Remarks: If False, the contents of this instance are not to be trusted.
source (object)Reference to data that should be cast.
True on success, false on failure.
CastFrom

CastTo<Q>

#
public virtual bool CastTo<Q>(ref Q target)
Attempt a cast to type Q.
Remarks: If false, the target instance contents are not guaranteed to be valid.
target (ref Q)Pointer to target of cast.
True on success, false on failure.
CastTo

Duplicate

#
public abstract IGH_Goo Duplicate()
Make a complete duplicate of this instance. No shallow copies.
Remarks: Classes which implement this interface should also provide type specific Duplicate methods
Duplicate

EmitProxy

#
public virtual IGH_GooProxy EmitProxy()
Create a new proxy for this instance. Return Null if this class does not support proxies.
EmitProxy

Read

#
public virtual bool Read(GH_IReader reader)
Default behaviour is to return True.
reader (GH_IReader)
Read

ScriptVariable

#
public virtual object ScriptVariable()
This function will be called when the local IGH_Goo instance disappears into a user Script. This would be an excellent place to cast your IGH_Goo type to a simple data type.
The default implementation of this function returns the Value instance.
ScriptVariable

ToString

#
public abstract override string ToString()
Creates a string description of the current instance value.
Object.ToString
ToString

Write

#
public virtual bool Write(GH_IWriter writer)
Default behaviour is to return True.
writer (GH_IWriter)
Write