System independent URL representation.
System independent URL representation.This class is used in the library to store URLs in a system independent format. The idea to use a general class to hold URL arose after we realized, that DjVu had to be able to access files both from the WEB and from the local disk. While it is strange to talk about system independence of HTTP URLs, file names formats obviously differ from platform to platform. They may contain forward slashes, backward slashes, colons as separators, etc. There maybe more than one URL corresponding to the same file name. Compare file:/dir/file.djvu and file://localhost/dir/file.djvu.
To simplify a developer's life we have created this class, which contains inside a canonical representation of URLs.
File URLs are converted to internal format with the help of GOS class.
All other URLs are modified to contain only forward slashes.
GString hash_argument(void) const
void set_hash_argument(const char * arg)
int cgi_arguments(void) const
int djvu_cgi_arguments(void) const
GString cgi_name(int num) const
GString djvu_cgi_name(int num) const
GString cgi_value(int num) const
GString djvu_cgi_value(int num) const
DArray<GString> cgi_names(void) const
DArray<GString> djvu_cgi_names(void) const
DArray<GString> cgi_values(void) const
DArray<GString> djvu_cgi_values(void) const
void clear_all_arguments(void)
void clear_hash_argument(void)
void clear_djvu_cgi_arguments(void)
void clear_cgi_arguments(void)
void add_djvu_cgi_argument(const char * name, const char * value=0)
GURL base(void) const
GString name(void) const
GString fname(void) const
GString extension(void) const
bool is_empty(void) const
bool is_local_file_url(void) const
Concatenation operators
friend int operator==(const GURL & gurl1, const GURL & gurl2)
friend int operator!=(const GURL & gurl1, const GURL & gurl2)
GURL& operator=(const GURL & url)
operator const char*(void) const
Constructors
GURL(const GURL & gurl)
virtual ~GURL(void)
friend unsigned int hash(const GURL & gurl)
Alphabetic index HTML hierarchy of classes or Java