OpenDaVINCI  4.16.0
odcore::io::URL Class Reference

#include <URL.h>

Public Member Functions

 URL (const string &connection)
 
 URL (const URL &obj)
 
virtual ~URL ()
 
URLoperator= (const URL &obj)
 
bool isValid () const
 
URLProtocol::PROTOCOL getProtocol () const
 
const string getResource () const
 
const string toString () const
 

Detailed Description

This class represents a URL:

URL u("file:///tmp/file.txt");

Constructor & Destructor Documentation

odcore::io::URL::URL ( const string &  connection)

Constructor.

Parameters
connectionConnection string.

References odcore::io::URLProtocol::getProtocol(), and odcore::io::URLProtocol::UNKNOWNPROTOCOL.

odcore::io::URL::URL ( const URL obj)

Copy constructor.

Parameters
objReference to an object of this class.
odcore::io::URL::~URL ( )
virtual

Member Function Documentation

URLProtocol::PROTOCOL odcore::io::URL::getProtocol ( ) const

This method returns the protocol type.

Returns
Protocol type.

Referenced by toString().

const string odcore::io::URL::getResource ( ) const

This method returns the resource.

Returns
Resource.

Referenced by odtools::player::Player::Player(), odtools::recorder::Recorder::Recorder(), and toString().

bool odcore::io::URL::isValid ( ) const

This method returns true if the connection string is valid.

Returns
true if the connection string is valid.

Referenced by toString().

URL & odcore::io::URL::operator= ( const URL obj)

Assignment operator.

Parameters
objReference to an object of this class.
Returns
Reference to this instance.
const string odcore::io::URL::toString ( ) const

This method returns a string representation of the URL.

Returns
string representation.

References odcore::io::URLProtocol::FILEPROTOCOL, getProtocol(), getResource(), isValid(), and odcore::io::URLProtocol::UNKNOWNPROTOCOL.