9 #ifndef lgrInterface_H_
10 #define lgrInterface_H_
28 class DtLgrCommandHandler;
47 virtual bool update();
51 void disconnectFromDispatcher();
54 void reconnectToDispatcher();
59 virtual void sendCommand(
const DtCommand&)
const;
73 typedef std::map<DtCommand,DtResponseFunctorSP,std::less<DtCommand> >
DtResponseMap;
85 template <
typename CommandHandlerType>
88 DtBoost::shared_ptr<DtLgrCommandHandler> commandHandler = \
89 logger.getCommandHandler(CommandHandlerType::Factory::theCommandType);
93 commandHandler->lock();
94 DtBoost::shared_ptr<CommandHandlerType> subCommandHandler = \
95 DtBoost::dynamic_pointer_cast<CommandHandlerType>(commandHandler);
98 typename CommandHandlerType::Interface* commandInterface = \
99 CommandHandlerType::Interface::createNonThreadsafe(logger,
102 commandHandler->unlock();
103 return commandInterface;
105 commandHandler->unlock();