SimpleTag

Simple tag with a value of type T, if T is a primitive type or it can be written in the buffer.

Constructors

this
this(T value)
Undocumented in source.

Alias This

value

Members

Functions

decode
void decode(Stream stream)
Undocumented in source. Be warned that the author may not have intended to support it.
encode
void encode(Stream stream)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
int opCmp(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
int opCmp(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
rename
Tag rename(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
toJSON
JSONValue toJSON()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

type
NBT_TYPE type [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

value
T value;
Undocumented in source.

Inherited Members

From Tag

_named
bool _named;
Undocumented in source.
_name
string _name;
Undocumented in source.
type
NBT_TYPE type [@property getter]

Gets the tag's type.

named
bool named()

Indicates whether the tag has a name.

name
string name()

Gets the tag's name, if there's one.

rename
Tag rename(string )

Creates a NamedTag maintaing the tag's properties.

encode
void encode(Stream )

Encodes the tag's body.

decode
void decode(Stream )

Decodes the tag's body.

toJSON
JSONValue toJSON()

Encodes the tag's value as json.

toString
string toString()

Encodes the tag a human-readable string.

Examples

assert(new Short(1) == 1);
assert(new SimpleTag!(char, 12)('c') == 'c');

Meta