From 44f2a3d1c8b65aecc1f6620a7123278849c8b333 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Fri, 24 Aug 2007 10:21:38 +0000 Subject: [PATCH] add wxVector docs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/array.tex | 8 +- docs/latex/wx/category.tex | 41 +++++++---- docs/latex/wx/list.tex | 3 +- docs/latex/wx/vector.tex | 147 +++++++++++++++++++++++++++++++++++++ 4 files changed, 179 insertions(+), 20 deletions(-) create mode 100644 docs/latex/wx/vector.tex diff --git a/docs/latex/wx/array.tex b/docs/latex/wx/array.tex index 7bd807ecad..e73da13ebd 100644 --- a/docs/latex/wx/array.tex +++ b/docs/latex/wx/array.tex @@ -9,10 +9,10 @@ %% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{\class{wxArray}}\label{wxarray} +\section{\class{wxArray}}\label{wxarray} This section describes the so called {\it dynamic arrays}. This is a C -array-like data structure i.e. the member access time is constant (and not +array-like type safe data structure i.e. the member access time is constant (and not linear according to the number of container elements as for linked lists). However, these arrays are dynamic in the sense that they will automatically allocate more memory if there is not enough of it for adding a new element. They also perform @@ -141,7 +141,9 @@ type, e.g. shorts, in an array of larger one, e.g. {\tt ARRAY\_INT}, does \wxheading{See also} -\helpref{Container classes overview}{wxcontaineroverview}, \helpref{wxList}{wxlist} +\helpref{Container classes overview}{wxcontaineroverview}, +\helpref{wxList}{wxlist}, +\helpref{wxVector}{wxvector} \wxheading{Include files} diff --git a/docs/latex/wx/category.tex b/docs/latex/wx/category.tex index dc08491900..a446c4960d 100644 --- a/docs/latex/wx/category.tex +++ b/docs/latex/wx/category.tex @@ -331,17 +331,7 @@ These are the data structure classes supported by wxWidgets. \twocolitem{\helpref{wxCmdLineParser}{wxcmdlineparser}}{Command line parser class} \twocolitem{\helpref{wxDateSpan}{wxdatespan}}{A logical time interval.} \twocolitem{\helpref{wxDateTime}{wxdatetime}}{A class for date/time manipulations} -%\twocolitem{\helpref{wxExpr}{wxexpr}}{A class for flexible I/O} -%\twocolitem{\helpref{wxExprDatabase}{wxexprdatabase}}{A class for flexible I/O} -\twocolitem{\helpref{wxArray}{wxarray}}{A dynamic array implementation} -\twocolitem{\helpref{wxArrayString}{wxarraystring}}{An efficient container for storing \helpref{wxString}{wxstring} objects} -\twocolitem{\helpref{wxHashMap}{wxhashmap}}{A simple hash map implementation} -\twocolitem{\helpref{wxHashSet}{wxhashset}}{A simple hash set implementation} -\twocolitem{\helpref{wxHashTable}{wxhashtable}}{A simple hash table implementation (deprecated, use wxHashMap)} -% \twocolitem{\helpref{wxHashTableLong}{wxhashtablelong}}{A wxHashTable version for storing long data} -\twocolitem{\helpref{wxList}{wxlist}}{A simple linked list implementation} \twocolitem{\helpref{wxLongLong}{wxlonglong}}{A portable 64 bit integer type} -\twocolitem{\helpref{wxNode}{wxnode}}{Represents a node in the wxList implementation} \twocolitem{\helpref{wxObject}{wxobject}}{The root class for most wxWidgets classes} \twocolitem{\helpref{wxPathList}{wxpathlist}}{A class to help search multiple paths} \twocolitem{\helpref{wxPoint}{wxpoint}}{Representation of a point} @@ -357,6 +347,24 @@ These are the data structure classes supported by wxWidgets. \twocolitem{\helpref{wxVariant}{wxvariant}}{A class for storing arbitrary types that may change at run-time} \end{twocollist} +{\large {\bf Container classes}} + +\overview{Overview}{wxcontaineroverview} + +These are classes, templates and class macros are used by wxWidgets. Most +of these classes provide a subset or almost complete STL API. + +\twocolwidtha{6cm} +\begin{twocollist}\itemsep=0pt +\twocolitem{\helpref{wxArray}{wxarray}}{A type-safe dynamic array implementation (macro based)} +\twocolitem{\helpref{wxArrayString}{wxarraystring}}{An efficient container for storing \helpref{wxString}{wxstring} objects} +\twocolitem{\helpref{wxHashMap}{wxhashmap}}{A type-safe hash map implementation (macro based)} +\twocolitem{\helpref{wxHashSet}{wxhashset}}{A type-safe hash set implementation(macro based)} +\twocolitem{\helpref{wxHashTable}{wxhashtable}}{A simple hash table implementation (deprecated, use wxHashMap)} +\twocolitem{\helpref{wxList}{wxlist}}{A type-safe linked list implementation (macro based)} +\twocolitem{\helpref{wxVector}{wxvector}}{Template base vector implementation} +\end{twocollist} + {\large {\bf Run-time class information system}} \overview{Overview}{runtimeclassoverview} @@ -647,9 +655,9 @@ used internally by the HTML classes. \twocolwidtha{6cm} \begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxXmlDocument}{wxxmldocument}}{A class to parse XML files.} -\twocolitem{\helpref{wxXmlNode}{wxxmlnode}}{A class which represents XML nodes.} -\twocolitem{\helpref{wxXmlAttribute}{wxxmlattribute}}{A class which represents XML properties.} +\twocolitem{\helpref{wxXmlDocument}{wxxmldocument}}{A class to parse XML files} +\twocolitem{\helpref{wxXmlNode}{wxxmlnode}}{A class which represents XML nodes} +\twocolitem{\helpref{wxXmlAttribute}{wxxmlattribute}}{A class which represent an XML attribute} \end{twocollist} {\large {\bf XML-based resource system classes}} @@ -661,8 +669,8 @@ from specifications stored in an XML format. \twocolwidtha{6cm} \begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxXmlResource}{wxxmlresource}}{The main class for working with resources.} -\twocolitem{\helpref{wxXmlResourceHandler}{wxxmlresourcehandler}}{The base class for XML resource handlers.} +\twocolitem{\helpref{wxXmlResource}{wxxmlresource}}{The main class for working with resources} +\twocolitem{\helpref{wxXmlResourceHandler}{wxxmlresourcehandler}}{The base class for XML resource handlers} \end{twocollist} {\large {\bf Online help}} @@ -684,7 +692,8 @@ from specifications stored in an XML format. \overview{Database classes overview}{odbcoverview} wxWidgets provides a set of classes for accessing Microsoft's ODBC (Open Database Connectivity) -product, donated by Remstar. This is known as wxODBC. +product, donated by Remstar. This is known as wxODBC. Note that these classes are deprecated +and will be removed from wxWidgets. \twocolwidtha{6cm} \begin{twocollist}\itemsep=0pt diff --git a/docs/latex/wx/list.tex b/docs/latex/wx/list.tex index 6eeecb52c3..cb54ec86cf 100644 --- a/docs/latex/wx/list.tex +++ b/docs/latex/wx/list.tex @@ -101,7 +101,8 @@ it is not only unsafe but is also much less efficient than \wxheading{See also} -\helpref{wxArray}{wxarray} +\helpref{wxArray}{wxarray}, +\helpref{wxVector}{wxvector} \latexignore{\rtfignore{\wxheading{Members}}} diff --git a/docs/latex/wx/vector.tex b/docs/latex/wx/vector.tex new file mode 100644 index 0000000000..1ca48015b7 --- /dev/null +++ b/docs/latex/wx/vector.tex @@ -0,0 +1,147 @@ +\section{\class{wxVector}}\label{wxvector} + +wxVector is a template which implements most of the std::vector +class and can be used like. If wxWidgets is compiled in STL mode, +wxVector will just be a typedef to std::vector. You should +refer to the STL documentation for further information. + +\wxheading{Derived from} + +No base class + +\wxheading{Include files} + + + +\wxheading{See also} + +\helpref{Container classes overview}{wxcontaineroverview}, +\helpref{wxList}{wxlist}, +\helpref{wxArray}{wxvector} + +\membersection{wxVector::wxVector}\label{wxvectorwxvector} + +\func{}{wxVector}{\void} + +\func{}{wxVector}{\param{const wxVector\& }{c}} + +Constructor. + +\membersection{wxVector::\destruct{wxVector}}\label{wxvectordtor} + +\func{}{\destruct{wxVector}}{\void} + +Destructor. + +\membersection{wxVector::operator=}\label{wxvectoroperatorassign} + +\func{wxVector\& operator}{operator=}{\param{const wxVector\& }{vb}} + +Assignement operator. + +\membersection{wxVector::at}\label{wxvectorat} + +\constfunc{const value\_type\&}{at}{\param{size\_type }{idx}} + +\func{value\_type\&}{at}{\param{size\_type }{idx}} + +Returns item at position {\it idx}. + +\membersection{wxVector::back}\label{wxvectorback} + +\constfunc{const value\_type\&}{back}{\void} + +\func{value\_type\&}{back}{\void} + +Return last item. + +\membersection{wxVector::begin}\label{wxvectorbegin} + +\constfunc{const\_iterator}{begin}{\void} + +\func{iterator}{begin}{\void} + +Return iterator to beginning of the vector. + +\membersection{wxVector::capacity}\label{wxvectorcapacity} + +\constfunc{size\_type}{capacity}{\void} + + +\membersection{wxVector::clear}\label{wxvectorclear} + +\func{void}{clear}{\void} + +Clears the vector. + +\membersection{wxVector::empty}\label{wxvectorempty} + +\constfunc{bool}{empty}{\void} + +Returns true if the vector is empty. + +\membersection{wxVector::end}\label{wxvectorend} + +\constfunc{const\_iterator}{end}{\void} + +\func{iterator}{end}{\void} + +Returns iterator to the end of the vector. + +\membersection{wxVector::erase}\label{wxvectorerase} + +\func{iterator}{erase}{\param{iterator }{it}} + +\func{iterator}{erase}{\param{iterator }{first}, \param{iterator }{last}} + +Erase items. + +\membersection{wxVector::front}\label{wxvectorfront} + +\constfunc{const value\_type\&}{front}{\void} + +\func{value\_type\&}{front}{\void} + +Returns first item. + +\membersection{wxVector::insert}\label{wxvectorinsert} + +\func{iterator}{insert}{\param{iterator }{it}, \param{const value\_type\& }{v = value\_type()}} + +Insert an item. When using values other than built-in integrals +or classes with reference counting this can be a very inefficient +operation. + +\membersection{wxVector::operator[]}\label{wxvectoroperatorunknown} + +\constfunc{const value\_type\&}{operator[]}{\param{size\_type }{idx}} + +\func{value\_type\&}{operator[]}{\param{size\_type }{idx}} + +Returns item at position {\it idx}. + +\membersection{wxVector::pop\_back}\label{wxvectorpopback} + +\func{void}{pop\_back}{\void} + +Removes the last item. + +\membersection{wxVector::push\_back}\label{wxvectorpushback} + +\func{void}{push\_back}{\param{const value\_type\& }{v}} + +Adds an item to the end of the vector. + +\membersection{wxVector::reserve}\label{wxvectorreserve} + +\func{void}{reserve}{\param{size\_type }{n}} + +Reserves more memory of {\it n} is greater then +\helpref{size}{wxvectorsize}. Other this call has +no effect. + +\membersection{wxVector::size}\label{wxvectorsize} + +\constfunc{size\_type}{size}{\void} + +Returns the size of the vector. -- 2.45.2