JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | List of all members
JBroadcasterMessageMap Class Reference

#include <JBroadcasterMessageMap.h>

Inheritance diagram for JBroadcasterMessageMap:
[legend]

Public Member Functions

 JBroadcasterMessageMap ()
 
 ~JBroadcasterMessageMap () override
 
bool Contains (const std::type_info &key) const
 
bool GetItem (const std::type_info &key, const JBroadcaster *obj, boost::any **f) const
 
void SetItem (const std::type_info &key, JBroadcaster *obj, boost::any *f, std::function< void()> *d)
 
bool GetList (const std::type_info &key, JArray< JBroadcasterMessageTuple > **f) const
 
void RemoveTuple (const std::type_info &key, const JBroadcaster *obj)
 
void RemoveAll (const std::function< void(JBroadcaster *, const std::type_info &)> &f)
 
- Public Member Functions inherited from JHashTable< JBroadcasterMessageTarget >
 JHashTable (const JSize lgSize=kJDefaultLgMinTableSize)
 
virtual ~JHashTable ()
 
bool IsEmpty () const
 
JSize GetItemCount () const
 
JSize GetLgSize () const
 
JSize GetLoadCount () const
 
JSize GetTableSize () const
 
JFloat GetFillFactor () const
 
JFloat GetLoadFactor () const
 
bool GetResizeEnabled () const
 
void SetResizeEnabled (const bool enabled)
 
JFloat GetMaxLoadFactor () const
 
void SetMaxLoadFactor (const JFloat newMax)
 
JFloat GetMinFillFactor () const
 
void SetMinFillFactor (const JFloat newMin)
 
JSize GetMinTableSize () const
 
void SetMinTableSize (const JSize newMin)
 
bool IsOK () const
 

Additional Inherited Members

- Protected Member Functions inherited from JHashTable< JBroadcasterMessageTarget >
bool IsEmpty (const JSize index) const
 
void AllowCursors ()
 
void DisallowCursors ()
 
JHashCursor< JBroadcasterMessageTarget > * GetCursor ()
 
JConstHashCursor< JBroadcasterMessageTarget > * GetCursor () const
 
const JHashRecord< JBroadcasterMessageTarget > & GetRecord (const JSize index) const
 
JHashRecordT::State GetState (const JSize index) const
 
bool IsDeleted (const JSize index) const
 
bool IsFull (const JSize index) const
 
JHashValue GetHashValue (const JSize index) const
 
const JBroadcasterMessageTargetGetValue (const JSize index) const
 
void Set (const JSize index, const JHashRecord< JBroadcasterMessageTarget > &record)
 
void Set (const JSize index, const JHashValue hash, const JBroadcasterMessageTarget &value)
 
void Set (const JSize index, const JBroadcasterMessageTarget &value)
 
void SetHash (const JSize index, const JBroadcasterMessageTarget &value)
 
void Remove (const JSize index)
 
void MarkEmpty (const JSize index)
 
void MarkAllEmpty ()
 
bool TryResizeTable (const JSize lgSize)
 
void ResizeTable (const JSize lgTrialSize)
 
virtual bool FitToLimits (const JSize required=0, const bool force=false)
 
JSize HashToIndex (JHashValue hash) const
 

Constructor & Destructor Documentation

◆ JBroadcasterMessageMap()

JBroadcasterMessageMap::JBroadcasterMessageMap ( )

◆ ~JBroadcasterMessageMap()

JBroadcasterMessageMap::~JBroadcasterMessageMap ( )
override

Member Function Documentation

◆ Contains()

bool JBroadcasterMessageMap::Contains ( const std::type_info &  key) const

This code is also used to position the cursor for use by other functions in both this class and derived classes!

◆ GetItem()

bool JBroadcasterMessageMap::GetItem ( const std::type_info &  key,
const JBroadcaster obj,
boost::any **  f 
) const

If the element is found, sets value to it and returns true; otherwise, nulls value and returns false.

◆ GetList()

bool JBroadcasterMessageMap::GetList ( const std::type_info &  key,
JArray< JBroadcasterMessageTuple > **  list 
) const

If the list is found, sets list to it and returns true; otherwise, nulls list and returns false.

◆ RemoveAll()

void JBroadcasterMessageMap::RemoveAll ( const std::function< void(JBroadcaster *, const std::type_info &)> &  f)

◆ RemoveTuple()

void JBroadcasterMessageMap::RemoveTuple ( const std::type_info &  key,
const JBroadcaster obj 
)

◆ SetItem()

void JBroadcasterMessageMap::SetItem ( const std::type_info &  key,
JBroadcaster obj,
boost::any *  f,
std::function< void()> *  d 
)

The element is set if it already existed and 'type' is kIfOld or kAlways (the default) or if it did not exist and 'type' is kIfNew or kAlways.

Returns true if the element was set, false otherwise. existed is set to true if there was something already there.

We prepend new items so they get the -next- message.


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