Value & Type


Value

value and type are HiLang support classes that are only stored in Hiperspace as part of an entity / aspect/ segment. value definitions are code-generated for encoding/decoding, nothing is generated for type (unless other elements inherit from them).

value can contain keys (used for uniqueness in Set), values and extents, with on-demand loading of references, but if aspect or segment is included they key must be globally unique.

value enables arbitrarily complex structures to be defined and stored.


Type

type is the only classification that all other types can inherit from and are useful for defining common base properties like Access.RBAC.Permissioned that has a reference to the User Author and creates indexes in each implementation entities.

The QlNet example has examples of type used to declare external references, but not to define them

/* addin for Permissioned elements */
type Access.RBAC.Permissioned 
{ 
    Author      : Access.RBAC.User
}
[
    ValidAuthor = Author = null ? false : true,
    ErrorAuthor = ValidAuthor = false ? "Missing user, " : "",
    " Index to permissioned entities "
    ByAuthor    : Access.RBAC.User (Author = Author)
];

type QLNet.ActualActual.Convention;
type QLNet.ActualActual;
type QLNet.BusinessDayConvention;
type QLNet.Calendar;
type QLNet.CashFlow;
type QLNet.DateGeneration.Rule;
type QLNet.DayCounter;
type QLNet.FixedRateBond;
type QLNet.Handle<QLNet.YieldTermStructure>;
type QLNet.IPricingEngine;
type QLNet.Period;
type QLNet.Schedule;
type QLNet.YieldTermStructure;

Copyright © Cepheis 2024