![]() |
Apama API Reference for .NET
10.7.2.0
|
Represents an Apama type. Used to define the type of fields in an EventType, and also for type parameters in complex types such as FieldTypes.Sequence<T>(FieldType<T>). Get field type objects using FieldTypes. More...
Inherits FieldType.
Inherited by Apama.Event.Parser.ContextFieldType, Apama.Event.Parser.DictionaryFieldType< TKey, TValue >, Apama.Event.Parser.OptionalFieldType< OptionalT, BaseT >, Apama.Event.Parser.PrimitiveFieldType< T >, Apama.Event.Parser.ReferenceFieldType< T >, Apama.Event.Parser.SequenceFieldType< E >, Apama.Event.Parser.DictionaryFieldType< Object, Object >, and Apama.Event.Parser.SequenceFieldType< Object >.
Public Member Functions | |
abstract T | DefaultValue () |
Returns default value of this field type. It is used when returning value of a field not explicitly set. More... | |
virtual string | Format (Object value) |
Format the given value in MonitorScript representation. More... | |
abstract object | GetDefaultValue () |
Get the default value for this field type. More... | |
Field< T > | NewField (string name) |
Creates a new Field object with the specified name, using this field type. More... | |
abstract T | Parse (String value) |
Parse a token according to syntax rules of this type. More... | |
abstract object | ParseObject (String value) |
Parse a value from this type's Apama event string representation into the .NET object representation of the value. More... | |
override string | ToString () |
For Internal use only More... | |
Protected Member Functions | |
FieldType (string typeName, Type clazz) | |
Create a new FieldType. More... | |
Properties | |
virtual string | Name [get] |
Return the name of this type. More... | |
Type | TypeClass [get] |
Return the .NET type used to express values of this Apama field type. More... | |
Represents an Apama type. Used to define the type of fields in an EventType, and also for type parameters in complex types such as FieldTypes.Sequence<T>(FieldType<T>). Get field type objects using FieldTypes.
Non-generic abstract base class representing an Apama type (with reduced compile-time type safety).
Almost all new applications should use this class instead of the legacy non-generic FieldType class.
To get FieldType objects, use FieldTypes.
The following example shows how it is possible to create a field object whose type is an Apama sequence of integers:
T | The .NET type used to represent values of this field type. |
For most applications, it is better to use the generic FieldType<T> class instead of this one, unless there is a specific requirement to process fields from Event objects without access to the corresponding generic FieldType<T> object.
|
protected |
Create a new FieldType.
typeName | the name of the fieldtype |
clazz | the underlying type of the fieldtype |
|
pure virtual |
Returns default value of this field type. It is used when returning value of a field not explicitly set.
Implemented in Apama.Event.Parser.EventType, Apama.Event.Parser.DictionaryFieldType< TKey, TValue >, Apama.Event.Parser.DictionaryFieldType< Object, Object >, Apama.Event.Parser.SequenceFieldType< E >, Apama.Event.Parser.SequenceFieldType< Object >, Apama.Event.Parser.ContextFieldType, Apama.Event.Parser.AnyFieldType, Apama.Event.Parser.OptionalFieldType< OptionalT, BaseT >, Apama.Event.Parser.ChannelFieldType, Apama.Event.Parser.DecimalFieldType, Apama.Event.Parser.IntegerFieldType, Apama.Event.Parser.FloatFieldType, Apama.Event.Parser.BooleanFieldType, Apama.Event.Parser.LocationFieldType, and Apama.Event.Parser.StringFieldType.
|
virtual |
Format the given value in MonitorScript representation.
value | The value to format |
Reimplemented in Apama.Event.Parser.DictionaryFieldType< TKey, TValue >, Apama.Event.Parser.DictionaryFieldType< Object, Object >, Apama.Event.Parser.SequenceFieldType< E >, and Apama.Event.Parser.SequenceFieldType< Object >.
|
pure virtual |
Get the default value for this field type.
Field<T> Apama.Event.Parser.FieldType< T >.NewField | ( | string | name | ) |
|
pure virtual |
Parse a token according to syntax rules of this type.
value | The value to parse |
Implemented in Apama.Event.Parser.AnyFieldType.
|
pure virtual |
Parse a value from this type's Apama event string representation into the .NET object representation of the value.
Usually it is better to use the Parse method instead of ParseObject, since Parse indicates the return type in its method signature, providing better usability and type safety than ParseObject.
value | The value to parse |
override string Apama.Event.Parser.FieldType< T >.ToString | ( | ) |
For Internal use only
|
get |
Return the name of this type.
|
get |
Return the .NET type used to express values of this Apama field type.