KeyValues Class

This class has no description.

Methods 37

Name Description
DeleteKey

Removes the given key from the current position.

DeleteThis

Removes the current sub-key and attempts to set the position to the sub-key after the removed one. If no such sub-key exists, the position will be the parent key in the traversal stack. Given the sub-key having position "N" in the traversal stack, the removal will always take place from position "N-1."

ExportToFile

Exports a KeyValues tree to a file. The tree is dumped from the current position.

ExportToString

Exports a KeyValues tree to a string. The string is dumped from the current position.

FindKeyById

Finds a KeyValues name by id.

GetColor

Retrieves a set of color values from a KeyValues key.

GetColor4

Retrieves a set of color values from a KeyValues key.

GetDataType

Returns the data type at a key.

GetFloat

Retrieves a floating point value from a KeyValues key.

GetNameSymbol

Finds a KeyValues id inside a KeyValues tree.

GetNum

Retrieves an integer value from a KeyValues key.

GetSectionName

Retrieves the current section name.

GetSectionSymbol

Retrieves the current section id.

GetString

Retrieves a string value from a KeyValues key.

GetUInt64

Retrieves a large integer value from a KeyValues key.

GetVector

Retrieves a vector value from a KeyValues key.

GoBack

Jumps back to the previous position. Returns false if there are no previous positions (i.e., at the root node with an empty traversal stack). This should be called once for each successful Jump call, in order to return to the top node. This function pops one node off the internal traversal stack.

GotoFirstSubKey

Sets the current position in the KeyValues tree to the first sub key. This native adds to the internal traversal stack.

GotoNextKey

Sets the current position in the KeyValues tree to the next sub key. This native does NOT add to the internal traversal stack, and thus GoBack() is not needed for each successive call to this function.

Import

Imports subkeys in the given KeyValues, at the current position in that KeyValues, into the current position in this KeyValues. Note that this copies keys; it does not embed a reference to them.

ImportFromFile

Imports a file in KeyValues format. The file is read into the current position of the tree.

ImportFromString

Converts a given string to a KeyValues tree. The string is read into the current postion of the tree.

JumpToKey

Sets the current position in the KeyValues tree to the given key.

JumpToKeySymbol

Sets the current position in the KeyValues tree to the given key.

KeyValues

Creates a new KeyValues structure. The Handle must be closed with CloseHandle() or delete.

NodesInStack

Returns the position in the jump stack; I.e. the number of calls required for KvGoBack to return to the root node. If at the root node, and the traversal stack is empty, 0 is returned.

Rewind

Sets the position back to the top node and clears the entire node traversal history (by default). This can be used instead of looping KvGoBack() if recursive iteration is not important.

SavePosition

Saves the current position in the traversal stack onto the traversal stack. This can be useful if you wish to use KvGotoNextKey() and have the previous key saved for backwards traversal.

SetColor

Sets a set of color values of a KeyValues key.

SetColor4

Sets a set of color values of a KeyValues key.

SetEscapeSequences

Sets whether or not the KeyValues parser will read escape sequences. For example, \n would be read as a literal newline. This defaults to false for new KeyValues structures.

SetFloat

Sets a floating point value of a KeyValues key.

SetNum

Sets an integer value of a KeyValues key.

SetSectionName

Sets the current section name.

SetString

Sets a string value of a KeyValues key.

SetUInt64

Sets a large integer value of a KeyValues key.

SetVector

Sets a vector value of a KeyValues key.

Properties 1

Name Type Description
ExportLengthint

Amount of bytes written by ExportToFile & ExportToString.