SAGA Adaptor CPI v.1.0
|
00001 // Copyright (c) 2005-2009 Hartmut Kaiser 00002 // 00003 // Distributed under the Boost Software License, Version 1.0. (See accompanying 00004 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 00005 00006 #if !defined(SAGA_ADAPTORS_UTILS_IS_LOCAL_ADDRESS_JAN_10_2009_0951AM) 00007 #define SAGA_ADAPTORS_UTILS_IS_LOCAL_ADDRESS_JAN_10_2009_0951AM 00008 00009 #include <string> 00010 #include <saga/saga/util.hpp> 00011 #include <saga/saga/url.hpp> 00012 00013 namespace saga { namespace adaptors { namespace utils 00014 { 00015 // forward declaration only 00016 SAGA_EXPORT bool is_local_address(std::string const & host); 00017 00018 inline bool is_local_address(saga::url const & url) 00019 { 00020 return is_local_address(url.get_host()); 00021 } 00022 00023 inline bool is_local_address(const char * url) 00024 { 00025 return is_local_address(saga::url (url)); 00026 } 00027 00028 }}} 00029 00030 #endif