MetaValue
ReferencesRepresents a meta data value. This is really just a wrapper class around all the supported meta data value types so we don't have to use 'object' to store meta data.
Fields
Properties
IntendedData
#Gets the intended value. This may return null as well as an IPear instance if the internal data can be successfully deserialised.
InternalData
#Gets the internal instance of the data. Typically you know what data type you're looking for and you don't have to rawdog the value directly.
IsSerialisedData
#Gets whether this value contains serialised data. For this to be true, the value must be of type string and start with one of the format identifiers.
Methods
CompareTo
#Parse
#Try and parse a string. This always works since STRING is a valid meta type, but you may not get the conversion you were expecting.
Store
#Serialiser. This class does not implement IStorable because that would break file IO with early versions. Instead, the data is written directly into the supplied writer object, so it's the responsibility of the caller to make sure multiple meta values do not collide within the same writer.
Parameters:
| writer (IWriter) |
TryCreate
#Try and create a meta value from any value. If the value is of a supported type, this method will succeed.
TryDeserialise
#Try and deserialise a value from a string for the purposes of meta-data storage.
Convertors
| Operation | Result | Description | ||
|---|---|---|---|---|
| implicit | Angle | MetaValue | ||
| implicit | BigInteger | MetaValue | ||
| implicit | bool | MetaValue | ||
| implicit | byte[] | MetaValue | ||
| implicit | Color | MetaValue | ||
| implicit | Colour | MetaValue | ||
| implicit | DateTime | MetaValue | ||
| implicit | double | MetaValue | ||
| implicit | Function | MetaValue | ||
| implicit | Gradient | MetaValue | ||
| implicit | Guid | MetaValue | ||
| implicit | int | MetaValue | ||
| implicit | Interval | MetaValue | ||
| implicit | Plane | MetaValue | ||
| implicit | Point3d | MetaValue | ||
| implicit | string | MetaValue | ||
| implicit | TimeSpan | MetaValue | ||
| implicit | Transform | MetaValue | ||
| implicit | Vector3d | MetaValue | ||