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
|
orcaice/proputils.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 ORCAICE_PROPERTY_UTILITIES_H 00012 #define ORCAICE_PROPERTY_UTILITIES_H 00013 00014 #include <string> 00015 #include <Ice/Ice.h> 00016 #include <orca/orca.h> 00017 #include <orca/bros1.h> 00018 00019 namespace orcaice 00020 { 00021 00026 00039 std::string getGlobalConfigFilename( const Ice::PropertiesPtr &props ); 00040 00062 std::string getApplicationConfigFilename( const Ice::StringSeq & args ); 00063 00078 std::string getServiceConfigFilename( const Ice::StringSeq & args ); 00079 00080 // 00081 // These guys are supposed to be simple wrappers for the Ice 'getPropertyXxxx' functions. 00082 // 00083 // In fact, things are a bit harder. Ice's 'getPropertAsInt' returns '0' for 'property not found'. 00084 // So everything goes through Ice's 'getProperty' instead, which returns an empty string on 'not found'. 00085 // 00086 00089 int getPropertyAsDouble( const Ice::PropertiesPtr &, const ::std::string& key, Ice::Double &value ); 00092 int getPropertyAsInt( const Ice::PropertiesPtr &, const ::std::string& key, int &value ); 00096 int getProperty( const Ice::PropertiesPtr &, const ::std::string& key, std::string &value ); 00103 int getPropertyAsIntVector( const Ice::PropertiesPtr &, const ::std::string& key, std::vector<int> &value ); 00110 int getPropertyAsDoubleVector( const Ice::PropertiesPtr &, const ::std::string& key, std::vector<double> &value ); 00111 00114 Ice::Double getPropertyAsDoubleWithDefault( const Ice::PropertiesPtr &, const ::std::string& key, const Ice::Double defaultValue ); 00117 int getPropertyAsIntWithDefault( const Ice::PropertiesPtr &, const ::std::string& key, const int defaultValue ); 00119 std::string getPropertyWithDefault( const Ice::PropertiesPtr &, const ::std::string& key, const std::string &defaultValue ); 00121 std::vector<int> getPropertyAsIntVectorWithDefault( const Ice::PropertiesPtr &, const ::std::string& key, const std::vector<int> &defaultValue ); 00124 std::vector<double> getPropertyAsDoubleVectorWithDefault( const Ice::PropertiesPtr &, const ::std::string& key, const std::vector<double> &defaultValue ); 00125 00127 std::string warnMissingProperty( const std::string & prop ); 00130 std::string warnMissingPropertyWithDefault( const std::string & prop, const std::string & defaultValue ); 00131 00133 std::string warnMissingProperty( const std::string & info, const std::string & prop ); 00136 std::string warnMissingPropertyWithDefault( const std::string & info, const std::string & prop, const std::string & defaultValue ); 00137 00139 00140 } // namespace 00141 00142 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)