Function |
Syntax | AddPreset( * A pointer to the Entity derived instance to add. It should be created from a Reader. Ownership is NOT transferred!
- Which module to add the entity to.
- Whether to overwrite if an instance of the EXACT same TYPE and name was found. If one of the same name but not the exact type, false is returned regardless and nothing will have been added.
- The file this instance was read from, or where it should be written.
- If "Same" is passed as the file path read from, an overwritten instance will keep the old one's file location entry. )
|
Description: |
Adds an Entity instance's pointer and name associations to the internal list of already read in Entity:s. Ownership is NOT transferred! If there already is an instance defined, nothing happens. If there is not, a clone is made of the passed-in Entity and added to the library. |
Returns | Whether or not a copy of the passed-in instance was successfully inserted into the module. False will be returned if there already was an instance of that class and instance name inserted previously, unless overwritten. |