libSBML Perl API  libSBML 5.8.0 Perl API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SBMLUri Class Reference

Detailed Description

comp utility class for handling uris.

This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. It is a class used in the implementation of extra functionality provided by libSBML.

The SBMLUri parses uris and provides information about them.

Public Member Functions

SBMLUriclone () const
 Creates and returns a deep copy of this SBMLUri object. More...
 
const std::string & getHost () const
 
const std::string & getPath () const
 
const std::string & getQuery () const
 
const std::string & getScheme () const
 
const std::string & getUri () const
 
SBMLUrioperator= (const SBMLUri &rhs)
 Assignment operator for SBMLUri. More...
 
SBMLUrioperator= (const std::string &uri)
 Assignment operator for SBMLUri, allows parsing of the given string. More...
 
SBMLUri relativeTo (const std::string &uri) const
 Constructs a new uri relative to this object and the given uri. More...
 
 SBMLUri (const std::string &uri)
 Creates a new SBMLUri from the given string uri. More...
 
 SBMLUri (const SBMLUri &orig)
 Copy constructor; creates a copy of an SBMLUri object. More...
 
virtual ~SBMLUri ()
 Destroy this SBMLUri object. More...
 

Constructor & Destructor Documentation

SBMLUri::SBMLUri ( const std::string &  uri)

Creates a new SBMLUri from the given string uri.

SBMLUri::SBMLUri ( const SBMLUri orig)

Copy constructor; creates a copy of an SBMLUri object.

Parameters
origthe SBMLUri object to copy.
Exceptions
SBMLConstructorExceptionThrown if the argument orig is NULL.
SBMLUri::~SBMLUri ( )
virtual

Destroy this SBMLUri object.

Member Function Documentation

SBMLUri * SBMLUri::clone ( ) const

Creates and returns a deep copy of this SBMLUri object.

Returns
a (deep) copy of this SBMLFileResolver object.
const std::string & SBMLUri::getHost ( ) const
Returns
the host of the uri (empty in case of files)
const std::string & SBMLUri::getPath ( ) const
Returns
the path of the uri (i.e: the full filename with path)
const std::string & SBMLUri::getQuery ( ) const
Returns
the query any additional query bit
const std::string & SBMLUri::getScheme ( ) const
Returns
the parsed scheme like 'file' or 'http'
const std::string & SBMLUri::getUri ( ) const
Returns
the original query (with only backslashes replaced to slashes)
SBMLUri & SBMLUri::operator= ( const SBMLUri rhs)

Assignment operator for SBMLUri.

Parameters
rhsThe object whose values are used as the basis of the assignment.
Exceptions
SBMLConstructorExceptionThrown if the argument rhs is NULL.
SBMLUri & SBMLUri::operator= ( const std::string &  uri)

Assignment operator for SBMLUri, allows parsing of the given string.

Parameters
urithe uri to parse
SBMLUri SBMLUri::relativeTo ( const std::string &  uri) const

Constructs a new uri relative to this object and the given uri.

For example, SBMLUri("c:\\test").relativeTo("test.xml") would construct a new file uri, with path c:/test/test.xml.

Parameters
uriuri to be added
Returns
the new uri