Isle
Loading...
Searching...
No Matches
LegoPhonemeList Class Reference

Specialized list class for managing LegoPhoneme objects. More...

#include <legophonemelist.h>

Inheritance diagram for LegoPhonemeList:
Collaboration diagram for LegoPhonemeList:

Public Member Functions

 LegoPhonemeList ()
 Constructor - sets custom destroy function for phoneme objects. More...
 
MxS8 Compare (LegoPhoneme *p_a, LegoPhoneme *p_b) override
 Compares two LegoPhoneme objects for equality, or orders them by address. More...
 
- Public Member Functions inherited from MxList< LegoPhoneme * >
 MxList ()
 [AI] Constructor. Initializes the list pointers to null (empty list). [AI] More...
 
 ~MxList () override
 [AI] Destructor. Deletes all entries in the list and manages resource ownership. [AI] More...
 
void Append (LegoPhoneme * p_obj)
 [AI] More...
 
void Prepend (LegoPhoneme * p_obj)
 [AI] More...
 
void DeleteAll ()
 [AI] More...
 
void Empty ()
 [AI] More...
 
MxU32 GetNumElements ()
 [AI] More...
 

Static Public Member Functions

static void Destroy (LegoPhoneme *p_element)
 Static destruction helper for MxList. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MxList< LegoPhoneme * >
void DeleteEntry (MxListEntry< LegoPhoneme * > *)
 [AI] More...
 
MxListEntry< LegoPhoneme * > * InsertEntry (LegoPhoneme *, MxListEntry< LegoPhoneme * > *, MxListEntry< LegoPhoneme * > *)
 [AI] More...
 
- Protected Member Functions inherited from MxCollection< T >
 MxCollection ()
 [AI] Constructs an empty collection, initializing count and default element destructor. More...
 
virtual MxS8 Compare (T a, T b)
 [AI] Compares two elements of the collection (default implementation returns zero; override in subclasses for meaningful comparison). More...
 
 ~MxCollection () override
 [AI] Virtual destructor for proper polymorphic destruction. More...
 
void SetDestroy (void(*p_customDestructor)(T))
 [AI] Assigns a custom destructor function to be used for elements of this collection. More...
 
- Protected Member Functions inherited from MxCore
 MxCore ()
 [AI] Constructs a new MxCore object and assigns it a unique id. More...
 
virtual ~MxCore ()
 [AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More...
 
virtual MxLong Notify (MxParam &p_param)
 [AI] Virtual callback notification mechanism. More...
 
virtual MxResult Tickle ()
 [AI] Called by tickle managers to allow the object to update itself. More...
 
virtual const char * ClassName () const
 [AI] Returns the runtime class name of this object. More...
 
virtual MxBool IsA (const char *p_name) const
 [AI] Checks whether this object's class type or parents match the given name. More...
 
MxU32 GetId ()
 [AI] Gets the unique (per-process) id assigned to this object instance. More...
 
- Static Protected Member Functions inherited from MxCollection< T >
static void Destroy (T obj)
 [AI] Static no-op destroy function; suitable for types that do not need destruction. More...
 
- Protected Attributes inherited from MxList< LegoPhoneme * >
MxListEntry< LegoPhoneme * > * m_first
 [AI] Pointer to the first entry in the list. [AI] More...
 
MxListEntry< LegoPhoneme * > * m_last
 [AI] Pointer to the last entry in the list. [AI] More...
 
- Protected Attributes inherited from MxCollection< T >
MxU32 m_count
 [AI] Number of elements currently stored in the collection. More...
 
void(* m_customDestructor )(T)
 [AI] Function pointer to the custom element destructor used for cleanup of elements. More...
 

Detailed Description

Specialized list class for managing LegoPhoneme objects.

[AI]

Inherits from MxList<LegoPhoneme*> and provides functionality for comparison and destruction tailored to LegoPhoneme objects. Used to maintain the ordered set of phoneme definitions used in speech or lip-sync features. [AI]

Definition at line 24 of file legophonemelist.h.

Constructor & Destructor Documentation

◆ LegoPhonemeList()

LegoPhonemeList::LegoPhonemeList ( )
inline

Constructor - sets custom destroy function for phoneme objects.

[AI]

Installs LegoPhonemeList::Destroy so the list is responsible for deleting its LegoPhoneme objects when clearing or being destructed. [AI]

Definition at line 31 of file legophonemelist.h.

Member Function Documentation

◆ Compare()

MxS8 LegoPhonemeList::Compare ( LegoPhoneme p_a,
LegoPhoneme p_b 
)
inlineoverride

Compares two LegoPhoneme objects for equality, or orders them by address.

[AI]

Parameters
p_aFirst LegoPhoneme pointer [AI]
p_bSecond LegoPhoneme pointer [AI]

Performs the following logic:

  • Compares the phoneme names using MxString::Equal().
  • Returns 0 if their names are equal.
  • Otherwise, orders pointers by their address: returns -1 if p_a < p_b, else 1. This function is used to maintain internal ordering and avoid duplicates. [AI]

Definition at line 43 of file legophonemelist.h.

◆ Destroy()

static void LegoPhonemeList::Destroy ( LegoPhoneme p_element)
inlinestatic

Static destruction helper for MxList.

[AI]

Parameters
p_elementPointer to the LegoPhoneme to delete [AI]

Called by MxList when removing elements or clearing the list, ensuring heap-allocated LegoPhoneme objects are properly freed. [AI]

Definition at line 56 of file legophonemelist.h.


The documentation for this class was generated from the following file: