#include <MacroSpaceManager.hpp>
Public Types | |
enum | { MACRO_PREORDER , MACRO_POSTORDER } |
Public Member Functions | |
ServerMacroSpaceManager () | |
void | terminateServer () |
void | addMacro (ServiceMessage &message) |
void | deleteMacro (ServiceMessage &message) |
void | clear (ServiceMessage &message) |
void | queryMacro (ServiceMessage &message) |
void | reorderMacro (ServiceMessage &message) |
void | iterateMacros (ServiceMessage &message) |
void | nextDescriptor (ServiceMessage &message) |
void | nextImage (ServiceMessage &message) |
void | getDescriptor (ServiceMessage &message) |
void | getImage (ServiceMessage &message) |
void | dispatch (ServiceMessage &message) |
void | cleanupProcessResources (SessionID session) |
bool | isStoppable () |
Protected Attributes | |
SysMutex | lock |
MacroTable | macros |
Definition at line 150 of file MacroSpaceManager.hpp.
anonymous enum |
Enumerator | |
---|---|
MACRO_PREORDER | |
MACRO_POSTORDER |
Definition at line 153 of file MacroSpaceManager.hpp.
|
inline |
Definition at line 160 of file MacroSpaceManager.hpp.
References SysMutex::create(), and lock.
void ServerMacroSpaceManager::addMacro | ( | ServiceMessage & | message | ) |
Definition at line 154 of file MacroSpaceManager.cpp.
References MacroTable::add(), ServiceMessage::clearMessageData(), ServiceMessage::getMessageData(), ServiceMessage::getMessageDataLength(), MacroTable::locate(), MACRO_ADDED, macros, ServiceMessage::nameArg, ServiceMessage::parameter2, ServiceMessage::setResult(), and MacroItem::update().
Referenced by dispatch().
void ServerMacroSpaceManager::cleanupProcessResources | ( | SessionID | session | ) |
Definition at line 410 of file MacroSpaceManager.cpp.
Referenced by APIServerInstance::cleanupProcessResources().
void ServerMacroSpaceManager::clear | ( | ServiceMessage & | message | ) |
Definition at line 194 of file MacroSpaceManager.cpp.
References MacroTable::clear(), MACRO_SPACE_CLEARED, macros, and ServiceMessage::setResult().
Referenced by dispatch().
void ServerMacroSpaceManager::deleteMacro | ( | ServiceMessage & | message | ) |
Definition at line 177 of file MacroSpaceManager.cpp.
References MacroTable::locate(), MACRO_DOES_NOT_EXIST, MACRO_REMOVED, macros, ServiceMessage::nameArg, MacroTable::remove(), and ServiceMessage::setResult().
Referenced by dispatch().
void ServerMacroSpaceManager::dispatch | ( | ServiceMessage & | message | ) |
Dispatch an inbound operation to this service manager.
message | The message to process. |
Definition at line 367 of file MacroSpaceManager.cpp.
References ADD_MACRO, addMacro(), clear(), CLEAR_MACRO_SPACE, deleteMacro(), GET_MACRO_DESCRIPTOR, GET_MACRO_IMAGE, getDescriptor(), getImage(), ITERATE_MACRO_DESCRIPTORS, ITERATE_MACROS, iterateMacros(), NEXT_MACRO_DESCRIPTOR, NEXT_MACRO_IMAGE, nextDescriptor(), nextImage(), ServiceMessage::operation, QUERY_MACRO, queryMacro(), REMOVE_MACRO, REORDER_MACRO, reorderMacro(), SERVER_FAILURE, and ServiceMessage::setExceptionInfo().
Referenced by APIServerInstance::dispatch().
void ServerMacroSpaceManager::getDescriptor | ( | ServiceMessage & | message | ) |
Definition at line 313 of file MacroSpaceManager.cpp.
References MacroItem::imageSize, MacroTable::locate(), MACRO_DOES_NOT_EXIST, MACRO_RETURNED, macros, ServiceMessage::nameArg, ServiceMessage::parameter1, ServiceMessage::parameter2, MacroItem::searchPosition, and ServiceMessage::setResult().
Referenced by dispatch().
void ServerMacroSpaceManager::getImage | ( | ServiceMessage & | message | ) |
Definition at line 340 of file MacroSpaceManager.cpp.
References MacroItem::imageBuffer, MacroItem::imageSize, MacroTable::locate(), MACRO_DOES_NOT_EXIST, macros, ServiceMessage::nameArg, ServiceMessage::parameter1, ServiceMessage::parameter2, ServiceMessage::retainMessageData, MacroItem::searchPosition, ServiceMessage::setMessageData(), and ServiceMessage::setResult().
Referenced by dispatch().
|
inline |
Definition at line 176 of file MacroSpaceManager.hpp.
References MacroTable::isEmpty(), and macros.
Referenced by APIServerInstance::isStoppable().
void ServerMacroSpaceManager::iterateMacros | ( | ServiceMessage & | message | ) |
Definition at line 245 of file MacroSpaceManager.cpp.
References MACRO_ITERATION_STARTED, MacroTable::macroCount(), macros, ServiceMessage::parameter1, ServiceMessage::setResult(), and MacroTable::startIteration().
Referenced by dispatch().
void ServerMacroSpaceManager::nextDescriptor | ( | ServiceMessage & | message | ) |
Definition at line 259 of file MacroSpaceManager.cpp.
References MacroTable::getNext(), MacroItem::imageSize, MACRO_RETURNED, macros, MacroItem::name, ServiceMessage::nameArg, NO_MORE_MACROS, ServiceMessage::parameter1, ServiceMessage::parameter2, MacroItem::searchPosition, and ServiceMessage::setResult().
Referenced by dispatch().
void ServerMacroSpaceManager::nextImage | ( | ServiceMessage & | message | ) |
Definition at line 284 of file MacroSpaceManager.cpp.
References MacroTable::getNext(), MacroItem::imageBuffer, MacroItem::imageSize, macros, MacroItem::name, ServiceMessage::nameArg, NO_MORE_MACROS, ServiceMessage::parameter1, ServiceMessage::parameter2, ServiceMessage::retainMessageData, MacroItem::searchPosition, ServiceMessage::setMessageData(), and ServiceMessage::setResult().
Referenced by dispatch().
void ServerMacroSpaceManager::queryMacro | ( | ServiceMessage & | message | ) |
Definition at line 205 of file MacroSpaceManager.cpp.
References MacroTable::locate(), MACRO_DOES_NOT_EXIST, macros, ServiceMessage::nameArg, MacroItem::searchPosition, and ServiceMessage::setResult().
Referenced by dispatch().
void ServerMacroSpaceManager::reorderMacro | ( | ServiceMessage & | message | ) |
Definition at line 225 of file MacroSpaceManager.cpp.
References MacroTable::locate(), MACRO_DOES_NOT_EXIST, MACRO_ORDER_CHANGED, macros, ServiceMessage::nameArg, ServiceMessage::parameter1, MacroItem::searchPosition, and ServiceMessage::setResult().
Referenced by dispatch().
void ServerMacroSpaceManager::terminateServer | ( | ) |
|
protected |
Definition at line 182 of file MacroSpaceManager.hpp.
Referenced by ServerMacroSpaceManager().
|
protected |
Definition at line 183 of file MacroSpaceManager.hpp.
Referenced by addMacro(), clear(), deleteMacro(), getDescriptor(), getImage(), isStoppable(), iterateMacros(), nextDescriptor(), nextImage(), queryMacro(), and reorderMacro().