| Home | Download | Screen shots | Discussion | Documentation | Links |
|---|
Public Methods | |
| 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 | urlBase () const |
| Get the portion of the path likely to correspond to a file name without its extension. | |
| const std::string | urlExt () const |
| Get the portion of the path likely to correspond to a file name extension. | |
| const std::string | urlPath () const |
| Get the URL without the last component of the path. | |
| const std::string | urlProtocol () const |
| Get the URL scheme. | |
| const std::string | urlModifier () const |
| Get the fragment identifier. | |
| const char * | localName () |
| Get the fully qualified name of a local file that is the downloaded resource at d_url. | |
| const char * | localPath () |
| Get the path of the local file that is the downloaded resource at d_url. | |
| std::istream & | inputStream () |
| Get an input stream for the resource. | |
| std::ostream & | outputStream () |
| Get an output stream for the resource. | |
Private Methods | |
| Doc2 (const Doc2 &) | |
| Doc2 & | operator= (const Doc2 &) |
| bool | filename (char *fn, int 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.
|
|
||||||||||||
|
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 d_url.
|
|
|
Get the path of the local file that is the downloaded resource at d_url.
|
|
|
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.
|