|
DABC (Data Acquisition Backbone Core)
2.9.9
|
Uniform Resource Locator interpreter. More...
#include <dabc/Url.h>
Public Member Functions | |
| std::string | GetFileName () const |
| std::string | GetFullName () const |
| std::string | GetHostName () const |
| std::string | GetHostNameWithPort (int dfltport=0) const |
| bool | GetOptionBool (const std::string &optname, bool dflt=false) const |
| double | GetOptionDouble (const std::string &optname, double dflt=0.) const |
| int | GetOptionInt (const std::string &optname, int dflt=0) const |
| std::string | GetOptions () const |
| std::string | GetOptionsPart (int number=0) const |
| std::string | GetOptionStr (const std::string &optname, const std::string &dflt="") const |
| int | GetPort () const |
| std::string | GetPortStr () const |
| std::string | GetProtocol () const |
| std::string | GetUrl () const |
| bool | HasOption (const std::string &optname) const |
| bool | IsValid () const |
| void | Reset () |
| void | SetOptions (const std::string &opt) |
| Method allows to set URL options directly to be able use all Get methods. More... | |
| bool | SetUrl (const std::string &url, bool showerr=true) |
| Url () | |
| Url (const char *url) | |
| Url (const std::string &url) | |
| virtual | ~Url () |
Static Public Member Functions | |
| static std::string | ComposeItemName (int nodeid, const std::string &itemname="") |
| ! More... | |
| static std::string | ComposePortName (int nodeid, const std::string &fullportname, int portid=-1) |
| ! Method creates url string with port address, which includes nodeid and full portname If optional parameter portid is specified, it added as last symbols of the address Like call dabc::Url::ComposePortName(1, "MyModule/Output", 2) will produce string "dabc://node1/MyModule/Output2" More... | |
| static bool | DecomposeItemName (const std::string &url, int &nodeid, std::string &itemtname) |
| Method decompose from url nodeid and full item name, which includes all parents. More... | |
| static void | ReplaceSpecialSymbols (std::string &opt) |
| ! More... | |
Protected Member Functions | |
| bool | GetOption (const std::string &optname, int optionnumber=-1, std::string *value=nullptr) const |
Protected Attributes | |
| std::string | fFileName |
| file name More... | |
| std::string | fHostName |
| host name More... | |
| std::string | fOptions |
| list of options More... | |
| int | fPort |
| port number More... | |
| std::string | fProtocol |
| protocol More... | |
| std::string | fUrl |
| Full URL. More... | |
| bool | fValid |
| Is URL valid. More... | |
Uniform Resource Locator interpreter.
Class dabc::Url supports following format: [protocol://][hostname[:port]][/filename.ext][?options[&moreoptions]]
|
protected |
| bool dabc::Url::SetUrl | ( | const std::string & | url, |
| bool | showerr = true |
||
| ) |
| std::string dabc::Url::GetHostNameWithPort | ( | int | dfltport = 0 | ) | const |
| void dabc::Url::SetOptions | ( | const std::string & | opt | ) |
| std::string dabc::Url::GetOptionsPart | ( | int | number = 0 | ) | const |
|
inline |
| std::string dabc::Url::GetOptionStr | ( | const std::string & | optname, |
| const std::string & | dflt = "" |
||
| ) | const |
| int dabc::Url::GetOptionInt | ( | const std::string & | optname, |
| int | dflt = 0 |
||
| ) | const |
| double dabc::Url::GetOptionDouble | ( | const std::string & | optname, |
| double | dflt = 0. |
||
| ) | const |
| bool dabc::Url::GetOptionBool | ( | const std::string & | optname, |
| bool | dflt = false |
||
| ) | const |
|
static |
|
static |
! Method creates url string with port address, which includes nodeid and full portname If optional parameter portid is specified, it added as last symbols of the address Like call dabc::Url::ComposePortName(1, "MyModule/Output", 2) will produce string "dabc://node1/MyModule/Output2"
|
static |
|
static |