Extractor for the tree of a Tuple2 in the form x -> y
Extractor for the tree of a Tuple2 in the form x -> y
Extractor for the tree of a Tuple2
Extractor for the tree of a Tuple2
Generate a specialized data access on a record
Generate a specialized data access on a record
Generate __dataAny
member
Generate __dataExists
member
Generate the equals method for Records.
Generate the equals method for Records. Two records are equal iff:
Generate the hashCode method of a record.
Generate the hashCode method of a record. The hasCode is an bitwise xor of the hashCodes of the field names (this one is calculated at compile time) and the hashCodes of the field values
Generate a lookup amongst the keys in data
and map to the tree
values.
Generate a lookup amongst the keys in data
and map to the tree
values. This is like an exhaustive pattern match on the strings, but may
be implemented more efficiently.
If default is None, it is assumed that nameTree
evaluates to one of
the keys of data
. Otherwise the default tree is used if a key
doesn't exist.
If mayCache
is true, the implementation might decide to store the
evaluated trees somewhere (at runtime). Otherwise, the trees will be
evaluated each time the resulting tree is evaluated.
Generalized record.
Generalized record. Implementation is totally left to the caller.
List of (field name, field type) tuples
Traits that are mixed into the resulting Rec (e.g. Serializable). Make sure the idents are fully qualified.
However you want to implement the __data
interface.
Generate the toString method of a record.
Generate the toString method of a record. The resulting toString method will generate strings of the form:
Rec { fieldName1 = fieldValue1, fieldName2 = fieldValue2, ... }
Create a Record
Create a Record
This creates a simple record that implements __data
. As a
consequence it needs to box when used with primitive types.
List of (field name, field type) tuples
Traits that are mixed into the resulting Rec (e.g. Serializable). Make sure the idents are fully qualified.
Additional members/fields of the resulting Rec (recommended for private data fields)
Implementation of the __data
method.
Should use the parameter fieldName
of type String and the type
parameter T
and return a value of type T
return a value of a corresponding type.
Macro that implements Rec.applyDynamic and Rec.applyDynamicNamed.
Macro that implements Rec.applyDynamic and Rec.applyDynamicNamed. You probably won't need this.
Determine the fields of a record
Determine the fields of a record
Create a specialized record
Create a specialized record
By providing implementations for all or some primitive types, boxing can be avoided.
List of (field name, field type) tuples
Traits that are mixed into the resulting Rec (e.g. Serializable). Make sure the idents are fully qualified.
Additional members/fields of the resulting Rec (recommended for private data fields)
Implementation of the __dataObj
method. Should
use the parameter fieldName
of type String and the type parameter
T
and return a value of type T
Partial function giving the implementations of
the __data*
methods. If it is not defined for some of the
__data*
methods, ???
will be used instead.
Should use the parameter fieldName
of type String and
return a value of a corresponding type.
The partial function will be called exactly once with each value in
specializedTypes.
Set of types for which the __data*
members are specialized