Rocket::Core::URL Class Reference

#include <URL.h>

Collaboration diagram for Rocket::Core::URL:

Public Types

typedef std::map< String, StringParameters
 Access the url parameters.

Public Member Functions

 URL ()
 Constructs an empty URL.
 URL (const String &url)
 Constructs a new URL from the given string.
 URL (const char *url)
 ~URL ()
 Destroys the URL.
bool SetURL (const String &url)
const StringGetURL () const
 Returns the entire URL.
bool SetProtocol (const String &protocol)
 Sets the URL's protocol.
const StringGetProtocol () const
 Returns the protocol this URL is utilising.
bool SetLogin (const String &login)
 Sets the URL's login.
const StringGetLogin () const
 Returns the URL's login.
bool SetPassword (const String &password)
 Sets the URL's password.
const StringGetPassword () const
 Returns the URL's password.
bool SetHost (const String &host)
 Sets the URL's host.
const StringGetHost () const
 Returns the URL's host.
bool SetPort (int port)
 Sets the URL's port number.
int GetPort () const
 Returns the URL's port number.
bool SetPath (const String &path)
 Sets the URL's path.
bool PrefixPath (const String &prefix)
 Prefixes the URL's existing path with the given prefix.
const StringGetPath () const
 Returns the URL's path.
bool SetFileName (const String &file_name)
 Sets the URL's file name.
const StringGetFileName () const
 Returns the URL's file name.
bool SetExtension (const String &extension)
 Sets the URL's file extension.
const StringGetExtension () const
 Returns the URL's file extension.
const ParametersGetParameters () const
void SetParameter (const String &name, const String &value)
void SetParameters (const Parameters &parameters)
void ClearParameters ()
String GetPathedFileName () const
 Returns the URL's path, file name and extension.
String GetQueryString () const
 Builds and returns a url query string ( key=value&key2=value2 ).
bool operator< (const URL &rhs) const
 Less-than operator for use as a key in STL containers.

Detailed Description

Author:
Peter Curry

Constructor & Destructor Documentation

Rocket::Core::URL::URL ( const char *  url  ) 

Constructs a new URL from the given string. A little more scripting engine friendly.


Member Function Documentation

bool Rocket::Core::URL::SetURL ( const String url  ) 

Assigns a new URL to the object. This will return false if the URL is malformed.


The documentation for this class was generated from the following files:
  • Include/Rocket/Core/URL.h
  • Source/Core/URL.cpp