Class Tag
Inherits from
-
Object
(base class)
Constructors
Name | Description |
---|---|
this
|
|
this
|
|
this
|
Fields
Name | Type | Description |
---|---|---|
location
|
Location |
File/Line/Column/Index information for where this tag was located in |
values
|
std |
Access all this tag's values, as an array of type sdlang .
|
Properties
Name | Type | Description |
---|---|---|
all
[get]
|
Tag |
Access all attributes and tags regardless of namespace. |
attributes
[get]
|
sdlang |
Access all attributes that don't have a namespace |
fullName
[get]
|
string |
This tag's name, including namespace if one exists. |
maybe
[get]
|
Tag |
Access attributes , tags , namespaces and all like normal,
|
name
[get, set]
|
string |
This tag's name, not including namespace. |
namespace
[get, set]
|
string |
This tag's namespace. Empty string if no namespace. |
namespaces
[get]
|
Tag |
Access all namespaces in this tag, and the attributes/tags within them. |
parent
[get]
|
Tag |
Get parent tag. To set a parent, attach this Tag to its intended |
tags
[get]
|
sdlang |
Access all direct-child tags that don't have a namespace. |
Methods
Name | Description |
---|---|
add
|
Adds a Value, Attribute, Tag (or array of such) as a member/child of this Tag. |
clone
|
Deep-copy this Tag. |
expectAttribute
|
Lookup an attribute of this tag by name, and retrieve a value of type T
from it. Throws if not found.
|
expectTag
|
Lookup a child tag by name. Throws if not found. |
expectTagAttribute
|
Lookup a child tag and attribute by name, and retrieve a value of type T from it. Throws if not found. |
expectTagValue
|
Lookup a child tag by name, and retrieve a value of type T from it. Throws if not found, |
expectValue
|
Retrieve a value of type T from this tag. Throws if not found.
|
getAttribute
|
Lookup an attribute of this tag by name, and retrieve a value of type T
from it. Returns a default value if not found.
|
getFullName
|
This tag's name, including namespace if one exists. |
getTag
|
Lookup a child tag by name. Returns null if not found. |
getTagAttribute
|
Lookup a child tag and attribute by name, and retrieve a value of type T from it. Returns a default value if not found. |
getTagAttributes
|
Lookup a child tag by name, and retrieve all attributes in a chosen (or default) namespace from it. |
getTagValue
|
Lookup a child tag by name, and retrieve a value of type T from it. Returns a default value if not found. |
getTagValues
|
Lookup a child tag by name, and retrieve all values from it. |
getValue
|
Retrieve a value of type T from this tag. Returns a default value if not found.
|
opEquals
|
|
remove
|
Removes this from its parent, if any. Returns this for chaining.
|
toDebugString
|
Outputs full information on the tag. |
toSDLDocument
|
Treats this as the root tag. Note that root tags cannot have
|
toSDLString
|
Output this entire tag in SDL format. Does not treat this as
|
Inner structs
Name | Description |
---|---|
MaybeAccess
|
|
MemberRange
|
|
NamedMemberRange
|
|
NamespaceAccess
|
|
NamespaceRange
|
Aliases
Name | Description |
---|---|
AttributeRange
|
|
TagRange
|