⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 doc_introduction.html

📁 指导程序员合理、高效的进行标准模板库编程。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
    complexity of certain operations is an important part of a concept's 
    requirements. For example, one of the most significant distinctions 
    between a <B><A href="BidirectionalIterator.html">Bidirectional Iterator</A></B> and a 
    <B><A href="RandomAccessIterator.html">Random Access Iterator</A></B> is that, for random access iterators, 
    expressions like <TT>p + n</TT> take constant time. Any such 
    requirements on run-time complexity are listed in this section.
    <LI>
    <B>Invariants:</B> Many concepts require that some property is 
    always true for objects of a type that models the concept being 
    defined. For example, <B><A href="LessThanComparable.html">LessThan Comparable</A></B> imposes the 
    requirement of <I>transitivity</I>: if <TT>x &lt; y</TT> and <TT>y 
    &lt; z</TT>, then <TT>x &lt; z</TT>. Some such properties are 
    &quot;axioms&quot; (that is, they are independent of any other 
    requirements) and some are &quot;theorems&quot; (that is, they follow 
    either from requirements in the <B>expression semantics</B> section 
    or from other requirements in the <B>invariants</B> section). 
    <LI>
    <B>Models</B>: A list of examples of types that are models of this 
    concept. Note that this list is not intended to be complete: in most 
    cases a complete list would be impossible, because there are an 
    infinite number of types that could model the concept.
    <LI>
    <B>Notes</B>: Footnotes (if any) that are referred to by other 
    parts of the page. 
    <LI>
    <B>See Also</B>: Links to other related pages.
</UL>
<H3>
The format of a <I>type </I>page</H3>
<P>
A page that documents a <I>type</I> has the following sections. </P>
<UL>
    <LI>
    <B>Description</B>. A summary of the type's properties.
    <LI>
    <B>Example of use</B>: A code fragment involving the type.
    <LI>
    <B>Definition</B>: A link to the source code where the type is 
    defined. 
    <LI>
    <B>Template parameters</B>: Almost all STL structs and classes are 
    templates. This section lists the name of each template parameter, its 
    purpose, and its default value (if any).
    <LI>
    <B>Model of</B>: A list of the concepts that this type is a model 
    of, and links to those concepts. Note that a type may be a model of 
    more than one concept: <TT><A href="Vector.html">vector</A></TT>, for example, is a model 
    of both <B><A href="RandomAccessContainer.html">Random Access Container</A></B> and 
    <B><A href="BackInsertionSequence.html">Back Insertion Sequence</A></B>. If a type is a model of two different concepts, that 
    simply means that it satisfies the requirements of both.
    <LI>
    <B>Type requirements</B>: The template parameters of a class 
    template usually must satisfy a set of requirements. Many of these can 
    simply be expressed by listing which concept a template parameter must 
    conform to, but some type requirements are slightly more complicated, 
    and involve a relationship between two different template parameters. 
    <LI>
    <B>Public base classes</B>: If this class inherits from any other 
    classes, they are listed in this section.
    <LI>
    <B>Members</B>: A list of this type's nested types, member 
    functions, member variables, and associated non-member functions. In 
    most cases these members are simply listed, rather than defined: since 
    the type is a model of some concept, detailed definitions aren't 
    usually necessary. For example, <TT><A href="Vector.html">vector</A></TT> is a model of <B><A href="Container.html" tppabs="http://www.sgi.com/Technology/STL/Container.shtml">Container</A></B>, 
    so the description of the member function <TT>begin()</TT> in the <B><A href="Container.html">Container</A></B>
     page applies to <TT><A href="Vector.html">vector</A></TT>, and there is no need to 
    repeat it in the <TT><A href="Vector.html">vector</A></TT> page. Instead, the <B>Members</B>
     section provides a very brief description of each member and a link to 
    whatever page defines that member more fully.
    <LI>
    <B>New Members:</B> A type might have some members that are not 
    part of the requirements of any of the concepts that it models. For 
    example, <A href="Vector.html">vector</A> has a member function called <TT>capacity()</TT>, 
    which is not part of the <B><A href="RandomAccessContainer.html">Random Access Container</A></B> or 
    <B><A href="BackInsertionSequence.html">Back Insertion Sequence</A></B> requirements. These members are defined in 
    the <B>New members</B> section.
    <LI>
    <B>Notes</B>: Footnotes (if any) that are referred to by other 
    parts of the page. 
    <LI>
    <B>See Also</B>: Links to other related pages.
</UL>
<H3>
The format of a <I>function </I>page</H3>
<P>
A page that documents a <I>function</I> has the following sections. </P>
<UL>
    <LI>
    <B>Prototype:</B> the function's declaration. 
    <LI>
    <B>Description:</B> A summary of what the function does.
    <LI>
    <B>Definition</B>: A link to the source code where the function is 
    defined. 
    <LI>
    <B>Requirements on types:</B> Most functions in the STL are function 
    templates. This section lists the requirements that must be satisfied 
    by the function's template parameters. Sometimes the requirements can 
    simply be expressed by listing which concept a template parameter must 
    conform to, but sometimes they are more complicated and involve a 
    relationship between two different template parameters. In the case of <TT><A href="find.html">find</A></TT>, 
    for example, the requirements are that the  parameter <TT>InputIterator</TT>
     is a model of <B><A href="InputIterator.html">Input Iterator</A></B>, that the parameter <TT>EqualityComparable</TT>
     is a model of <B><A href="EqualityComparable.html">Equality Comparable</A></B>, and that comparison 
    for equality is possible between objects of type <TT>EqualityComparable</TT>
     and objects of <TT>InputIterator</TT>'s value types. 
    <LI>
    <B>Preconditions:</B> Functions usually aren't guaranteed to yield 
    a well-defined result for any possible input, but only for valid input; 
    it is an error to call a function with invalid input. This section 
    describes the conditions for validity. 
    <LI>
    <B>Complexity:</B> Guarantees on the function's run-time 
    complexity. For example, <TT><A href="find.html">find</A></TT>'s run-time complexity is 
    linear in the length of the input range. 
    <LI>
    <B>Example of use:</B> A code fragment that illustrates how to use 
    the function.
    <LI>
    <B>Notes</B>: Footnotes (if any) that are referred to by other 
    parts of the page. 
    <LI>
    <B>See Also</B>: Links to other related pages.
</UL>

<HR SIZE="6"> <FONT SIZE="-2"> Copyright &copy; 1996 Silicon Graphics, Inc.
<HR>
<TABLE BORDER=0 WIDTH="100%" >
<TR>
<TD WIDTH="33%"><FONT SIZE=-1><A HREF="index.html" >
STL</A></FONT></TD>

<TD WIDTH="33%">
<CENTER><FONT SIZE=-2>&copy; Copyright 1997-1998 CodeGuru</FONT>&nbsp;</CENTER>
</TD>

<TD WIDTH="34%">
<DIV ALIGN=right><FONT SIZE=-1>Contact : <A HREF="mailto:webmaster@codeguru.com">webmaster@codeguru.com</A>&nbsp;</FONT></DIV>
</TD>
</TR>
</TABLE>
<SCRIPT LANGUAGE="JavaScript" ><!--
var adurl = "/cgi-bin/doubleclick.cgi?";

if( self.adcategory )
	adurl += adcategory;
else
	adurl += "mfc";

if( self.parent.norefreshad )
	parent.norefreshad = false;
else if( validframes )
	parent.frames['ad'].location = adurl;



if( !validframes && nfrm == -1)
{
	var dclkPage = "www.codeguru.com/";
	if( self.adcategory )
		dclkPage += adcategory;
	else 
		dclkPage += "mfc";
//	var random = Math.random();
	document.write('<nolayer><center>');
	document.write('<iframe src="http://ad.doubleclick.net/adi/' + dclkPage + ';ord='
	 + random + '" width=470 height=62 marginwidth=0 marginheight=0 hspace=0 vspace=0 '
	 + 'frameborder=0 scrolling=no bordercolor="#000000">');
	document.write('<a href="http://ad.doubleclick.net/jump/' + dclkPage + ';ord='
	 + random + '">');
	document.write('<img src="http://ad.doubleclick.net/ad/' + dclkPage + ';ord='
	 + random + '" height=60 width=468>' + '</a>');
	document.write('</iframe>');
	document.write('</center></nolayer>');
	document.write('<layer  src="http://ad.doubleclick.net/adl/' + dclkPage + 
	 ';ord=' + random + '"></layer>');
	document.write('<ilayer visibility=hide width=468 height=83></ilayer>');
}

// -->
</SCRIPT> 
<!-- SCRIPT LANGUAGE="JavaScript" SRC="/global/fscript.js">
//
</SCRIPT --> 

<noscript>
<p align="center">
<a href="http://ad.doubleclick.net/jump/www.codeguru.com/cpp;ord=NupaBNFCY34AAHbDKU8">
<img src="http://ad.doubleclick.net/ad/www.codeguru.com/cpp;ord=NupaBNFCY34AAHbDKU8"></a>
</p>
</noscript>





</BODY>
</HTML>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -