wxURL - doc cleanups, depreciated more methods, more source comments. wxURI - enclosed literal characters with wxT, more source comments, doc cleanups, changed StartsWith(x) to [ou] == x

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2004-10-28 22:22:40 +00:00
parent 5bb05e6dc6
commit ce321570b0
6 changed files with 242 additions and 181 deletions

View File

@@ -22,6 +22,9 @@ In short, a URL \em{is} a URI. In other
words, URL is a subset of a URI - all
acceptable URLs are also acceptable URIs.
wxURI automatically escapes invalid characters in a string,
so there is no chance of wxURI "failing" on construction/creation.
wxURI supports copy construction and standard assignment
operators. wxURI can also be inherited from to provide
furthur functionality.
@@ -39,7 +42,7 @@ furthur functionality.
\membersection{Obtaining individual components}\label{obtainingwxuricomponents}
To obtain individual components you can use
one of the following methods:
one of the following methods
\helpref{GetScheme}{wxurigetscheme}\\
\helpref{GetUser}{wxurigetuser}\\
@@ -50,8 +53,12 @@ one of the following methods:
\helpref{GetFragment}{wxurigetfragment}
However, you should check HasXXX before
calling a get method:\\
calling a get method, which determines whether or not the component referred
to by the method is defined according to RFC 2396.
Consider an undefined component equivilent to a
NULL C string.\\
\\
\helpref{HasScheme}{wxurihasscheme}\\
\helpref{HasUser}{wxurihasuser}\\
\helpref{HasServer}{wxurihasserver}\\
@@ -112,10 +119,13 @@ BuildUnescapedURI performs some optimizations over the plain method.
\membersection{wxURI::Create}\label{wxuricreate}
\func{void}{Create}{\param{const wxChar* }{uri}}
\func{const wxChar*}{Create}{\param{const wxChar* }{uri}}
Creates this URI from the string \arg{uri}.
Returns the position at which parsing stopped (there
is no such thing as an "invalid" wxURI).
\docparam{uri}{string to initialize from}

View File

@@ -17,16 +17,6 @@ and comparison operators.
\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxProtocol}{wxprotocol}
\wxheading{Example}
\begin{verbatim}
wxURL url("http://a.host/a.dir/a.file");
wxInputStream *in_stream;
in_stream = url.GetInputStream();
// Then, you can use all IO calls of in_stream (See wxStream)
\end{verbatim}
% ----------------------------------------------------------------------------
% Members
% ----------------------------------------------------------------------------
@@ -53,15 +43,6 @@ contain three consecutive slashes.
Destroys the URL object.
%
% GetProtocolName
%
\membersection{wxURL::GetProtocolName}\label{wxurlgetprotocolname}
\constfunc{wxString}{GetProtocolName}{\void}
Returns the name of the protocol which will be used to get the URL.
%
% GetProtocol
%
@@ -71,15 +52,6 @@ Returns the name of the protocol which will be used to get the URL.
Returns a reference to the protocol which will be used to get the URL.
%
% GetPath
%
\membersection{wxURL::GetPath}\label{wxurlgetpath}
\func{wxString}{GetPath}{\void}
Returns the path of the file to fetch. This path was encoded in the URL.
%
% GetError
%
@@ -112,6 +84,22 @@ Creates a new input stream on the the specified URL. You can use all but seek
functionality of wxStream. Seek isn't available on all stream. For example,
http or ftp streams doesn't deal with it.
Note that this method is somewhat depreciated, all future wxWidgets applications
should really use \helpref{wxFileSystem}{wxfilesystem} instead.
Example:
\begin{verbatim}
wxURL url("http://a.host/a.dir/a.file");
if (url.GetError() == wxURL_NOERR)
{
wxInputStream *in_stream;
in_stream = url.GetInputStream();
// Then, you can use all IO calls of in_stream (See wxStream)
}
\end{verbatim}
\wxheading{Return value}
Returns the initialized stream. You will have to delete it yourself.