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 Project Download Mailing lists
|
orcaprobe/factory.h00001 /* 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 ORCA_ORCAPROBE_FACTORY_H 00012 #define ORCA_ORCAPROBE_FACTORY_H 00013 00014 #include <vector> 00015 #include <string> 00016 #include <orca/common.h> 00017 #include <orca/ocm.h> 00018 00019 namespace orcaice 00020 { 00021 class Context; 00022 } 00023 00024 namespace orcaprobe 00025 { 00026 00027 class InterfaceProbe; 00028 class AbstractDisplay; 00029 00035 class Factory 00036 { 00037 public: 00038 virtual ~Factory() {}; 00039 00043 std::vector<std::string> supportedTypes() const; 00044 00048 bool isSupported( const std::string &interfaceType ) const; 00049 00052 virtual InterfaceProbe* create( const std::string & id, 00053 const orca::FQInterfaceName & name, 00054 const Ice::ObjectPrx & adminPrx, 00055 AbstractDisplay & display, 00056 const orcaice::Context & context ) = 0; 00057 protected: 00058 00060 void addSupportedType( const std::string & interfaceType ); 00061 00062 private: 00063 std::vector<std::string> types_; 00064 }; 00065 00066 } // namespace 00067 00068 00069 // Function for instantiating plug-in factories. 00070 // A plug-in library must have a function like so: 00071 // extern "C" { 00072 // orcalog::Factory *createFactory(); 00073 // } 00074 typedef orcaprobe::Factory *FactoryMakerFunc(); 00075 00076 00077 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)