ServiceInterface.hpp

Go to the documentation of this file.
00001 /*
00002 Copyright 2007, 2008, 2009, 2010, 2011 Instituto de Sistemas e Robotica, Instituto Superior Tecnico
00003 
00004 This file is part of MeRMaID.
00005 
00006 MeRMaID is free software: you can redistribute it and/or modify
00007 it under the terms of the GNU Lesser General Public License as published by
00008 the Free Software Foundation, either version 3 of the License, or
00009 (at your option) any later version.
00010 
00011 MeRMaID is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU Lesser General Public License for more details.
00015 
00016 You should have received a copy of the GNU Lesser General Public License
00017 along with MeRMaID.  If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 
00020 
00021 
00022 /**
00023  * @Filename ServiceInterface.hpp
00024  * @Description Support ServiceInterface declaration
00025  * @Status Work in Progress
00026  * @Version $Id: ServiceInterface.hpp 1 2011-03-04 18:13:18Z jreis $
00027  * @Maintainer nmsra (nmsra@mega.ist.utl.pt)
00028  */
00029 
00030 
00031 #ifndef __SUPPORT_SERVICEINTERFACE_H
00032 #define __SUPPORT_SERVICEINTERFACE_H
00033 
00034 namespace mermaid
00035 {
00036   namespace support
00037   {
00038     namespace service
00039     {
00040       class ServiceInterface;
00041     }
00042   }
00043 }
00044 
00045 #include "ServiceReply.hpp"
00046 #include "ServiceRequest.hpp"
00047 #include "ServiceInterfaceDescription.hpp"
00048 #include "ServiceInterfaceHandlerMethod.hpp"
00049 
00050 namespace mermaid
00051 {
00052   namespace support
00053   {
00054     namespace service
00055     {
00056     
00057       /**
00058       * @Class ServiceInterface ServiceInterface.hpp "ServiceInterface.hpp"
00059       * @Description This class represents a Service Interface
00060       * @Author Marco Barbosa + Nelson Ramos
00061       */
00062       class ServiceInterface
00063       {
00064           friend class ServiceDescription;
00065           
00066         public:
00067         
00068           ServiceInterface (shared_ptr<ServiceInterfaceDescription> interfaceDescription);
00069           
00070           shared_ptr<ServiceInterfaceDescription> getServiceInterfaceDescription();
00071           
00072           void setHandlerMethod (shared_ptr<ServiceInterfaceHandlerMethodBase> handlerMethod);
00073 //                 shared_ptr<ServiceInterfaceHandlerMethodBase> getHandler();
00074 
00075           shared_ptr<ServiceReply> processServiceRequest (shared_ptr<ServiceRequest> request);
00076           
00077         private:
00078         
00079           shared_ptr<ServiceInterfaceDescription> interfaceDescription_;
00080           
00081           void cleanUp();
00082           void copyFrom (const ServiceInterface& otherInterface);
00083           
00084           bool validHandler_;
00085           shared_ptr<ServiceInterfaceHandlerMethodBase> handlerMethod_;
00086           
00087           
00088       }; // class ServiceInterface
00089     } // namespace service
00090   } // namespace support
00091 } // namespace mermaid
00092 
00093 #endif // __SUPPORT_SERVICEINTERFACE_H
Generated on Fri Mar 4 22:14:58 2011 for MeRMaID::support by  doxygen 1.6.3