INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

service.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef ORCAICE_ICEBOX_SERVICE_H
00012 #define ORCAICE_ICEBOX_SERVICE_H
00013 
00014 #include <IceBox/IceBox.h>
00015 
00016 namespace orcaice {
00017 
00018 class Component;
00019 
00035 class Service : public IceBox::Service
00036 {
00037 
00038 public:
00039 
00043     Service();
00044     virtual ~Service();
00045 
00046     // Implements virtual function called by IceBox on start-up.
00047     // Input parameters @p name and @p args come from the service configuration line
00048     // of the IceBox config file (the line which specifies @e create entry point ).
00049     virtual void start(const ::std::string        & name,
00050                        const Ice::CommunicatorPtr & communicator,
00051                        const Ice::StringSeq       & args);
00052 
00053     // Implements virtual function called by IceBox on shut-down.
00054     virtual void stop();
00055 
00056 protected:
00057 
00058     // A service contains only one Component. Derived services will need to set this
00059     // pointer so we make it protected.
00060     orcaice::Component *component_;
00061     
00062 private:
00063 
00064     // By Orca convention there is exactly one adapter per component and, therefore, per service
00065     // Keep the pointer to it here, so it does not get destroyed too soon.
00066     Ice::ObjectAdapterPtr   adapter_;
00067 
00068     // This is flag which is set to true by the first service which uses the shared
00069     // communicator (after it configures it with factory defaults and global settings)
00070     static bool _isSharedCommunicatorConfigured;
00071 };
00072 
00073 } // namespace
00074 
00075 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5