OpenDaVINCI  4.15.3
odcore::io::URLProtocol Class Reference

#include <URLProtocol.h>

Public Types

enum  PROTOCOL { UNKNOWNPROTOCOL, FILEPROTOCOL }
 

Public Member Functions

virtual ~URLProtocol ()
 

Static Public Member Functions

static PROTOCOL getProtocol (string &connection)
 

Detailed Description

This class provides a protocol parser for URLs.

void foo() {
Protocol::PROTOCOL p = Protocol::getProtocol("file://myFile");
...
}

Member Enumeration Documentation

Enumerator
UNKNOWNPROTOCOL 
FILEPROTOCOL 

Constructor & Destructor Documentation

odcore::io::URLProtocol::~URLProtocol ( )
virtual

Member Function Documentation

URLProtocol::PROTOCOL odcore::io::URLProtocol::getProtocol ( string &  connection)
static

This method tries to extract the connection type by parsing the protocol type.

Parameters
connectionThe connection string to be parsed. The type of protocol is removed from the string.
Returns
Connection type.

References odcore::strings::StringToolbox::trim().

Referenced by odcore::io::URL::URL().