haystack.tag

Haystack data types.

Members

Aliases

Dict
alias Dict = Tag[string]
Undocumented in source.
Grid
alias Grid = GridImpl!(Dict)
Undocumented in source.
List
alias List = Tag[]
Undocumented in source.
Number
alias Number = Num

Alternative name for a Num

Functions

errorGrid
Grid errorGrid(Exception ex)
Undocumented in source. Be warned that the author may not have intended to support it.
errorGrid
Grid errorGrid(string message)

Make an error Grid

get
T get(const(Dict) dict, string key)

Get Dict property of type T, or if property is missing T.init

has
bool has(const(Dict) dict, string col)

Check if Dict contains column.

has
bool has(const(Dict) dict, string key)

Test if Dict has property of type T

missing
bool missing(const(Dict) dict, string col)

Check if Dict misses the column.

missing
bool missing(const(Dict) dict, string key)

Test if Dict misses property of type T

tag
Tag tag(double val, string unit)
Tag tag(long val, string unit)
Tag tag(T t)

Creates a Tag from a buildin type.

tag
Tag tag(T t)
Tag tag(Num n)
Tag tag(List t)

Creates a Tag from a Tag allowed type.

toStr
Str toStr(const(Tag) tag)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString(const(Dict) dict)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString(const(List) list)
Undocumented in source. Be warned that the author may not have intended to support it.

Imports

Date (from std.datetime)
public import std.datetime : Date;
Undocumented in source.
DateTime (from std.datetime)
public import std.datetime : DateTime;
Undocumented in source.
SysTime (from std.datetime)
public import std.datetime : SysTime;
Undocumented in source.
TimeOfDay (from std.datetime)
public import std.datetime : TimeOfDay;
Undocumented in source.

Properties

boolean
Tag boolean [@property getter]

Creates a Bool ($D Tag).

dis
string dis [@property getter]

Gets the 'dis' property for the Dict. If the Dict has no 'id' or no 'dis' then an empty string is returned, if there is an 'id' property but without a 'dis' the 'id' value is returned.

empty
bool empty [@property getter]

Check if Dict is empty.

id
immutable(Ref) id [@property getter]

Gets the 'id' key for the Dict. Returns a Ref.init otherwise

isNull
const(Dict) isNull [@property setter]

Test if the Dict has a key of null value

marker
Tag marker [@property getter]

Creates a Marker ($D Tag).

na
Tag na [@property getter]

Creates a Na ($D Tag).

num
double num [@property setter]
long num [@property setter]

Creates a Num ($D Tag).

str
Tag str [@property getter]

Creates a Str ($D Tag).

uri
Tag uri [@property getter]

Creates a Uri ($D Tag).

Structs

Bool
struct Bool

Holds boolean "true" or "false" values.

Coord
struct Coord

Latitude and Longitude global coordinates

GridImpl
struct GridImpl(T)

Haystack Grid.

Marker
struct Marker

Marker tags are used to indicate a "type" or "is-a" relationship.

Na
struct Na

Represents not available for missing data.

Num
struct Num

Holds a numeric 64 bit floating point value

Ref
struct Ref

Holds a Ref value

Str
struct Str

Holds a string value

Tag
struct Tag

Any haystack value type.

Time
struct Time

Holds an ISO 8601 time as hour, minute, seconds and millisecs: 09:51:27.354

Uri
struct Uri

Holds a Unversial Resource Identifier.

XStr
struct XStr

Extended typed string which specifies a type name a string encoding

Templates

visit
template visit(Funcs...)

Implements a simple pattern matching logic

Meta

Authors

Radu Racariu