orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca 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-2008 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/orca.h> 00017 00018 namespace orcaice 00019 { 00020 class Context; 00021 } 00022 00023 namespace orcaprobe 00024 { 00025 00026 class InterfaceProbe; 00027 class IDisplay; 00028 00034 class Factory 00035 { 00036 public: 00037 virtual ~Factory() {}; 00038 00042 std::vector<std::string> supportedTypes() const; 00043 00047 bool isSupported( const std::string &interfaceType ) const; 00048 00051 virtual InterfaceProbe* create( const std::string & id, 00052 const orca::FQInterfaceName & name, 00053 IDisplay & display, 00054 const orcaice::Context & context ) = 0; 00055 protected: 00056 00058 void addSupportedType( const std::string & interfaceType ); 00059 00060 private: 00061 std::vector<std::string> types_; 00062 }; 00063 00064 } // namespace 00065 00066 00067 // Function for instantiating plug-in factories. 00068 // A plug-in library must have a function like so: 00069 // extern "C" { 00070 // orcalog::Factory *createFactory(); 00071 // } 00072 typedef orcaprobe::Factory *FactoryMakerFunc(); 00073 00074 00075 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)