Home | Download | Screen shots | Discussion | Documentation |
---|
Public Member Functions | |
doc2 (const std::string &url=std::string(), const doc2 *relative=0) | |
Constructor. | |
~doc2 () | |
Destructor. | |
void | seturl (const std::string &url, const doc2 *relative=0) |
Set the URL. | |
const std::string | url () const |
Get the URL. | |
const std::string | url_base () const |
Get the portion of the path likely to correspond to a file name without its extension. | |
const std::string | url_ext () const |
Get the portion of the path likely to correspond to a file name extension. | |
const std::string | url_path () const |
Get the URL without the last component of the path. | |
const std::string | url_protocol () const |
Get the URL scheme. | |
const std::string | 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_. | |
std::istream & | input_stream () |
Get an input stream for the resource. | |
std::ostream & | output_stream () |
Get an output stream for the resource. | |
Private Member Functions | |
doc2 (const doc2 &) | |
Not implemented. | |
doc2 & | operator= (const doc2 &) |
Not implemented. | |
bool | filename (char *fn, size_t nfn) |
Converts a url into a local filename. | |
Private Attributes | |
std::string | url_ |
The URL. | |
char * | tmpfile_ |
Name of the temporary file created for the local copy of the resource. | |
std::istream * | istm_ |
A file descriptor for reading the local copy of the resource. | |
std::ostream * | ostm_ |
A pointer to a std::ostream used for writing the resource. |
doc2 is a hack of doc. When the ANTLR parser was added to OpenVRML, a doc work-alike was needed that would read from a std::istream instead of a C FILE
*
. doc2's purpose is to fill that need, and to remind us through its ugliness just how badly both it and doc need to be replaced with an I/O solution that doesn't suck.
|
Constructor.
|
|
Destructor.
|
|
Not implemented.
For internal use only. doc2 is not copyable. |
|
Converts a url into a local filename.
|
|
Get an input stream for the resource.
|
|
Get the fully qualified name of a local file that is the downloaded resource at url_.
|
|
Get the path of the local file that is the downloaded resource at url_.
|
|
Not implemented.
For internal use only. doc2 is not copyable. |
|
Get an output stream for the resource.
|
|
Set the URL.
|
|
Get the URL.
|
|
Get the portion of the path likely to correspond to a file name without its extension.
|
|
Get the portion of the path likely to correspond to a file name extension.
|
|
Get the fragment identifier.
|
|
Get the URL without the last component of the path. In spite of its name, this method does not return the URL's path.
|
|
Get the URL scheme.
|
|
A file descriptor for reading the local copy of the resource.
|
|
A pointer to a std::ostream used for writing the resource.
|
|
Name of the temporary file created for the local copy of the resource.
|
|
The URL.
|