- More doc
This commit is contained in:
Tristan B. Velloza Kildaire 2024-04-26 23:16:02 +02:00
parent 1d74ffc0e5
commit 9ab19a7eed
1 changed files with 23 additions and 3 deletions

View File

@ -344,34 +344,54 @@ public struct Registry
}
}
/**
* Creates a new entry and adds it
*
* An exception is thrown if an entry
* at that key exists and the policy
* for overwriting is to deny
*
* Params:
* name = the key
* entry = the configuration entry
*/
public void newEntry(string name, ConfigEntry entry)
{
newEntry(name, entry, this.allowOverwriteEntry, true);
}
// TOD: Add on-the-spot ConfigEntry creastion
/**
* See_Also: `newEntry(name, ConfigEntry)`
*/
public void newEntry(string name, int numeric)
{
newEntry(name, ConfigEntry.ofNumeric(numeric));
}
/**
* See_Also: `newEntry(name, ConfigEntry)`
*/
public void newEntry(string name, string text)
{
newEntry(name, ConfigEntry.ofText(text));
}
/**
* See_Also: `newEntry(name, ConfigEntry)`
*/
public void newEntry(string name, bool flag)
{
newEntry(name, ConfigEntry.ofFlag(flag));
}
/**
* See_Also: `newEntry(name, ConfigEntry)`
*/
public void newEntry(string name, string[] array)
{
newEntry(name, ConfigEntry.ofArray(array));
}
/**
* Sets the entry at the given name
* to the provided entry