Void slcaddsearchdirectory(SLCONFIGNODE. node, SLCONFIGSTRING directory,bool copy);Adds a directory to search when loading files. This is used for both #includestatements and the loading functions.
Directories are searched in order of theiraddition with the current directory always being searched first. All directoriesare shared between all nodes in the tree.Arguments:. node - any node in the tree. directory - the directory to search.
Since the open beta went live in early August, Felspire has welcomed hundred thousands of players from across the global and many players have successfully advanced class to Templar, Sniper and Sage. The 28th of August, Siegelord launched Version 1.1. Highlights include: new class advance, new level cap, new PvP map and new equipment set system. At level 300, the Constellation system will be.
copy - whether to make a copy of the directory string or just reference it###slcclearsearchdirectories. Bool slcloadnodesstring(SLCONFIGNODE. aggregate, SLCONFIGSTRING filename,SLCONFIGSTRING file, bool copy);Like but with a passed string instead of anexternal file. Note that the function may still perform file operations if thepassed string has #include statements.Arguments:. aggregate - an aggregate node. filename - path to the file. This is only used for error reporting.
file - contents of the file to parse. copy - whether to make a copy of the file string or just reference itReturns:true if the file was parsed successfully, false if there was an error.Possible errors include aggregate not being an aggregate or there being syntaxerrors in the file.###slcsavenode.
Bool slcsavenode( const SLCONFIGNODE. node, SLCONFIGSTRING filename,SLCONFIGSTRING lineend, SLCONFIGSTRING indentation);Saves a node to a file. Block comments are used for docstrings. Heredocs areused for strings that cannot be naked strings; naked strings are usedotherwise.Arguments:. node - any node. This doesn't have to be the root node.
filename - filename to save the node to. lineend - string to append at the end of every statement. Can be empty. indentation - string to prepend to statements for every level ofindentation. Can be emptyReturns:true if the node was saved successfully. False if there was an error withwriting the file.###slcsavenodestring. SLCONFIGSTRING slcsavenodestring( const SLCONFIGNODE.
node, SLCONFIGSTRING lineend,SLCONFIGSTRING indentation);Like but with redirecting the output to astring.Arguments:. node - any node. This doesn't have to be the root node. lineend - string to append at the end of every statement. Can be empty. indentation - string to prepend to statements for every level ofindentation. Can be emptyReturns:The string holding the representation of the passed node.
This string is newlyallocated and will need to be destroyed.###slcaddnode. SLCONFIGNODE. slcaddnode(SLCONFIGNODE. aggregate, SLCONFIGSTRING type,bool copytype, SLCONFIGSTRING name,bool copyname, bool isaggregate);Adds a node to an aggregate.
If an aggregate already has a node which matchesthe type string, the name and the type (aggregate vs. Not aggregate) then thatnode is returned instead without making a new node. The node is initialized tohave no children if it is an aggregate, or an empty string if it is not. If anexisting node is returned then it is not altered in any way.Arguments:. aggregate - aggregate to add the node to. type - type string of the new node.
Can be empty. copytype - whether to make a copy of the type string or just reference it. name - name of the new node. Can be empty. copyname - whether to make a copy of the name string or just reference it. isaggregate - whether the newly added node is an aggregateReturns:Newly added node, existing node or NULL if there is an error.
Possiblesources of error include aggregate not being an aggregate, or there alreadyexisting a node with the same name but differing type.###slcdestroynode. SLCONFIGNODE. slcgetnodebyreference(SLCONFIGNODE.
aggregate,SLCONFIGSTRING reference);Searches for a node using the reference using the aggregate as a startingpoint. Essentially the same syntax for references is used as in the fileformat except that comments are not allowed. Note that if a relativereference is passed to this function then the node that is returned might notbe a child of the aggregate, and in fact could be the aggregate itself.Arguments:. aggregate - an aggregate to start the search in (if a relative referenceis used). reference - reference to the node to search forReturns:The found node or NULL if no such node exists.###slcgetname.
Void slcdestroystring(SLCONFIGSTRING. str,void. (.customrealloc)( void., sizet));Destroys a string using a custom memory allocator if needed. For stringsreturned by the API the allocator must match the allocator passed in thecustom vtable.Arguments:.
str - string to destroy. customrealloc - a custom realloc function. Can be NULL in which casethe C realloc function is used.LicenseThe library is licensed under LGPL 3.0 (see LICENSE). The examples are licensed under the Zlib license.