-
Method create
void Public.Parser.ClearSilver.HDF()->create()
- Description
Creates a new, empty HDF object. HDF objects are used to store
and manipulate all the data to be rendered by a CS object.
-
Method read_file
void Public.Parser.ClearSilver.HDF()->read_file(string filename)
- Description
Reads and parses a file containing an HDF dataset, and adds it
to the current object.
- Parameter filename
The name of the file containing the HDF dataset.
-
Method write_file
void Public.Parser.ClearSilver.HDF()->write_file(string filename)
- Description
Writes the current HDF dataset out to a file.
- Parameter filename
The name of the file to write the data to. If it exists, the file
will be overwritten.
-
Method get
string Public.Parser.ClearSilver.HDF()->get(string hdfpath)
- Description
Returns the value of hdfpath, or 0 if hdfpath does
not exist.
- Parameter hdfpath
The path to look for the value in dotted form "A.B.C".
-
Method set
void Public.Parser.ClearSilver.HDF()->set(string hdfpath, string value)
- Description
Sets hdfpath to be new_value.
- Parameter hdfpath
The path to set in dotted form "A.B.C".
- Parameter value
The value to set hdfpath to.
-
Method sort
void Public.Parser.ClearSilver.HDF()->sort(function sort_function)
- Description
Sorts an HDF object's data using the supplied function.
- Parameter sort_function
The function used to sort the HDF data. It must accept two strings, and return
1 if the first argument is greater than the second, 0 if they are equal, or -1
if the first argument is less than the second.
-
Method name
string Public.Parser.ClearSilver.HDF()->name()
- Description
Returns the name of the current HDF node. Only the current level
is returned. If this node is A.B.C, obj_name will return "C".
-
Method value
string Public.Parser.ClearSilver.HDF()->value()
- Description
Returns the value of the current HDF node.
-
Method child
object(Public.Parser.ClearSilver.HDF) Public.Parser.ClearSilver.HDF()->child()
- Description
Returns an HDF object representing the child of the current HDF object.
-
Method next
object(Public.Parser.ClearSilver.HDF) Public.Parser.ClearSilver.HDF()->next()
- Description
Returns an HDF object representing the next peer of the current
HDF object.
-
Method get_hdf
object(Public.Parser.ClearSilver.HDF) Public.Parser.ClearSilver.HDF()->get_hdf(string hdfpath)
- Description
Returns an HDF object representing the HDF subtree located at
hdfpath.
- Parameter hdfpath
The path to retrieve in dotted form "A.B.C".
-
Method get_child
object(Public.Parser.ClearSilver.HDF) Public.Parser.ClearSilver.HDF()->get_child(string hdfpath)
- Description
Returns an HDF object representing the child of the HDF path
hdfpath.
- Parameter hdfpath
The path to retrieve the child of, in dotted form "A.B.C".
-
Method delete_tree
void Public.Parser.ClearSilver.HDF()->delete_tree(string hdfpath)
- Description
Recursively delete a node and all its child nodes from the HDF object.
- Parameter hdfpath
The path to the hdf node to delete, in dotted form "A.B.C".
-
Method copy
void Public.Parser.ClearSilver.HDF()->copy(string hdfpath, object(Public.Parser.ClearSilver.HDF) src)
- Description
Copies an HDF object into the current HDF object's tree.
- Parameter hdfpath
The path in the current object's tree to copy the object to, in
dotted form "A.B.C".
- Parameter src
The HDF object to copy into the current objects tree.
-
Method read
void Public.Parser.ClearSilver.HDF()->read(string data)
- Description
Reads and parses a string of HDF data, and adds it to the current
object's HDF tree. Returns 1 on success or 0 on failure.
- Parameter data
The data to read, in either HDF format.
-
Method write
string Public.Parser.ClearSilver.HDF()->write(string|void prefix)
- Description
Returns a string containing the current HDF dataset.
- Parameter prefix
The optional prefix to prepend to the HDF data returned.
|