Create a unique Entry instance for the specified terminal.


#include <asr/slot-factory.h>
SlotFactory_Entry* SlotFactory_createUniqueEntry(SlotFactory *self, const char *terminal, const uint64_t *id)



A pointer to the slot factory instance to use to allocate the new slot entry.


The terminal string to associate with the new slot entry.


An optional pointer to a buffer containing a 64-bit entry ID that is associated with the asr_slot_entry_t type associated with the returned slot entry. If this argument is NULL, the factory will automatically assign an ID to the entry.




If no slot entry for the specified terminal has been created by the current factory instance (using the createUniqueEntry() function), the SlotFactory_createUniqueEntry() function allocates and returns a new slot entry. The new slot entry has an asr_slot_entry_t structure associated with it from the slot entry buffer maintained by the factory.


A new instance of the SlotFactory_Entry type, created on the heap, that represents the specified terminal. The ownership of the returned memory is retained by the called context, which will delete it when the Factory is reset. If an Entry for terminal has already been created by this factory, its corresponding entry is returned. A NULL pointer is returned if this function fails to create a new entry.