| Home | Download | Screen shots | Discussion | Documentation |
|---|
This is just a shell until a real http protocol library is found...
Public Member Functions | |
| doc (const std::string &url=std::string(), const doc *relative=0) | |
| Constructor. | |
| doc (const std::string &url, const doc2 *relative) | |
| Constructor. | |
| ~doc () | |
| Destructor. | |
| void | seturl (const char *url, const doc *relative=0) |
| Set the URL. | |
| void | seturl (const char *url, const doc2 *relative=0) |
| Set the URL. | |
| const char * | url () const |
| Get the URL. | |
| const char * | url_base () const |
| Get the portion of the path likely to correspond to a file name without its extension. | |
| const char * | url_ext () const |
| Get the portion of the path likely to correspond to a file name extension. | |
| const char * | url_path () const |
| Get the URL without the last component of the path. | |
| const char * | url_protocol () const |
| Get the URL scheme. | |
| const char * | url_modifier () const |
| Get the fragment identifier. | |
| const char * | local_name () |
| Get the fully qualified name of a local file that is the downloaded resource at url_. | |
| const char * | local_path () |
| Get the path of the local file that is the downloaded resource at url_. | |
| FILE * | fopen (const char *mode) |
| Open a file. | |
| void | fclose () |
| Close a file. | |
| std::ostream & | output_stream () |
| Get an output stream for writing to the resource. | |
Private Member Functions | |
| bool | filename (char *fn, int nfn) |
| Converts a url into a local filename. | |
Private Attributes | |
| char * | url_ |
| The URL. | |
| std::ostream * | out_ |
| A pointer to a std::ostream used for writing the resource. | |
| FILE * | fp_ |
| A file descriptor for reading the local copy of the resource. | |
| char * | tmpfile_ |
| Name of the temporary file created for the local copy of the resource. | |
| openvrml::doc::doc | ( | const std::string & | url = std::string(), |
|
| const doc * | relative = 0 | |||
| ) | [explicit] |
Constructor.
| url | an HTTP or file URL. | |
| relative | the doc that url is relative to, or 0 if url is an absolute URL. |
| openvrml::doc::doc | ( | const std::string & | url, | |
| const doc2 * | relative | |||
| ) |
Constructor.
| url | an HTTP or file URL. | |
| relative | the doc2 that url is relative to, or 0 if url is an absolute URL. |
| openvrml::doc::~doc | ( | ) |
Destructor.
| void openvrml::doc::seturl | ( | const char * | url, | |
| const doc * | relative = 0 | |||
| ) |
Set the URL.
| url | the new URL. | |
| relative | the doc that url is relative to, or 0 if url is an absolute URL. |
| void openvrml::doc::seturl | ( | const char * | url, | |
| const doc2 * | relative = 0 | |||
| ) |
Set the URL.
| url | the new URL. | |
| relative | the doc2 that url is relative to, or 0 if url is an absolute URL. |
| const char * openvrml::doc::url | ( | ) | const |
Get the URL.
| const char * openvrml::doc::url_base | ( | ) | const |
Get the portion of the path likely to correspond to a file name without its extension.
| const char * openvrml::doc::url_ext | ( | ) | const |
Get the portion of the path likely to correspond to a file name extension.
| const char * openvrml::doc::url_path | ( | ) | const |
Get the URL without the last component of the path.
In spite of its name, this method does not return the URL's path.
| const char * openvrml::doc::url_protocol | ( | ) | const |
Get the URL scheme.
| const char * openvrml::doc::url_modifier | ( | ) | const |
Get the fragment identifier.
| const char * openvrml::doc::local_name | ( | ) |
Get the fully qualified name of a local file that is the downloaded resource at url_.
| const char * openvrml::doc::local_path | ( | ) |
Get the path of the local file that is the downloaded resource at url_.
| FILE * openvrml::doc::fopen | ( | const char * | mode | ) |
Open a file.
| void openvrml::doc::fclose | ( | ) |
Close a file.
Closes the file opened with doc::fopen.
| std::ostream & openvrml::doc::output_stream | ( | ) |
Get an output stream for writing to the resource.
| bool openvrml::doc::filename | ( | char * | fn, | |
| int | nfn | |||
| ) | [private] |
Converts a url into a local filename.
| fn | a character buffer to hold the local filename. |
| nfn | the number of elements in the buffer fn points to. |
char * openvrml::doc::url_ [private] |
The URL.
std::ostream * openvrml::doc::out_ [private] |
A pointer to a std::ostream used for writing the resource.
FILE * openvrml::doc::fp_ [private] |
A file descriptor for reading the local copy of the resource.
char * openvrml::doc::tmpfile_ [private] |
Name of the temporary file created for the local copy of the resource.