RegistrationTable Class Reference

#include <RegistrationTable.hpp>

Public Member Functions

 RegistrationTable ()
 
void registerLibraryCallback (ServiceMessage &message)
 
void registerCallback (ServiceMessage &message)
 
void queryCallback (ServiceMessage &message)
 
void queryLibraryCallback (ServiceMessage &message)
 
void dropCallback (ServiceMessage &message)
 
void dropLibraryCallback (ServiceMessage &message)
 
void updateCallback (ServiceMessage &message)
 
RegistrationDatalocate (RegistrationData *anchor, const char *name)
 
RegistrationDatalocate (const char *name, const char *module)
 
RegistrationDatalocate (const char *name)
 
RegistrationDatalocate (const char *name, SessionID session)
 
void remove (RegistrationData **anchor, RegistrationData *block)
 
void reorderBlocks (RegistrationData *&anchor, RegistrationData *current, RegistrationData *previous)
 
void freeProcessEntries (SessionID session)
 
bool hasEntries ()
 
bool isEmpty ()
 

Protected Attributes

RegistrationDatafirstEntryPoint
 
RegistrationDatafirstLibrary
 

Detailed Description

Definition at line 98 of file RegistrationTable.hpp.

Constructor & Destructor Documentation

◆ RegistrationTable()

RegistrationTable::RegistrationTable ( )
inline

Definition at line 101 of file RegistrationTable.hpp.

References firstEntryPoint, and firstLibrary.

Member Function Documentation

◆ dropCallback()

◆ dropLibraryCallback()

◆ freeProcessEntries()

void RegistrationTable::freeProcessEntries ( SessionID  session)

It will remove all the registration entries for a specific process

Parameters
sessionThe session identifier.

Definition at line 693 of file RegistrationTable.cpp.

References firstEntryPoint, RegistrationData::next, and RegistrationData::owner.

Referenced by ServerRegistrationManager::freeProcessRegistrations().

◆ hasEntries()

bool RegistrationTable::hasEntries ( )
inline

Definition at line 121 of file RegistrationTable.hpp.

References firstEntryPoint, and firstLibrary.

Referenced by isEmpty().

◆ isEmpty()

bool RegistrationTable::isEmpty ( )
inline

Definition at line 125 of file RegistrationTable.hpp.

References hasEntries().

Referenced by ServerRegistrationManager::isStoppable().

◆ locate() [1/4]

RegistrationData * RegistrationTable::locate ( const char *  name)

search for a library-type registration

Parameters
nameThe target name.
Returns
The descriptor for the callback, or NULL if it doesn't exist.

Definition at line 626 of file RegistrationTable.cpp.

References firstEntryPoint, firstLibrary, and locate().

◆ locate() [2/4]

RegistrationData * RegistrationTable::locate ( const char *  name,
const char *  module 
)

search for a library-type registration, qualified by name and library.

Parameters
nameThe callback name.
moduleThe target module.
Returns
The descriptor for the item, or NULL if not found.

Definition at line 598 of file RegistrationTable.cpp.

References firstLibrary, RegistrationData::matches(), RegistrationData::next, and reorderBlocks().

◆ locate() [3/4]

RegistrationData * RegistrationTable::locate ( const char *  name,
SessionID  session 
)

search for a local type registration

Parameters
nameThe target registration name.
sessionThe session identifier.
Returns
The registration data for the item, or NULL if not found.

Definition at line 645 of file RegistrationTable.cpp.

References firstEntryPoint, RegistrationData::matches(), RegistrationData::next, and reorderBlocks().

◆ locate() [4/4]

RegistrationData * RegistrationTable::locate ( RegistrationData anchor,
const char *  name 
)

search for a name-only registration

Parameters
anchorThe chain anchor.
nameThe target callback name.
Returns
The callback descriptor or NULL if the item is not found.

Definition at line 536 of file RegistrationTable.cpp.

References RegistrationData::matches(), and RegistrationData::next.

Referenced by dropCallback(), dropLibraryCallback(), locate(), queryCallback(), queryLibraryCallback(), registerCallback(), registerLibraryCallback(), and updateCallback().

◆ queryCallback()

◆ queryLibraryCallback()

◆ registerCallback()

◆ registerLibraryCallback()

◆ remove()

void RegistrationTable::remove ( RegistrationData **  anchor,
RegistrationData block 
)

search for a name-only registration and remove it from the chain.

Parameters
anchorThe chain anchor position.
blockThe block to locate.

Definition at line 561 of file RegistrationTable.cpp.

References RegistrationData::next.

Referenced by dropCallback(), and dropLibraryCallback().

◆ reorderBlocks()

void RegistrationTable::reorderBlocks ( RegistrationData *&  anchor,
RegistrationData current,
RegistrationData previous 
)

Reorder the registration blocks so that we put the most recently referenced registrations at the front of the queue.

Parameters
anchorThe chain anchor.
currentThe block we're reordering.
previousThe previous block in the chain (can be NULL if this item is already at the head of the chain).

Definition at line 676 of file RegistrationTable.cpp.

References RegistrationData::next.

Referenced by locate().

◆ updateCallback()

Member Data Documentation

◆ firstEntryPoint

RegistrationData* RegistrationTable::firstEntryPoint
protected

◆ firstLibrary


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