cppannotations/yo/containers/notations.yo
Frank B. Brokken 688cd5ed42 STL: WIP
git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@350 f6dd340e-d3f9-0310-b409-bdd246841980
2009-12-24 15:25:29 +00:00

28 lines
1.3 KiB
Text

In this chapter about containers, the following notational conventions are
used:
itemization(
it() Containers live in the standard namespace. In code examples this will
be clearly visible, but in the text tt(std::) is usually omitted.
it() A i(container without angle brackets) represents any container of
that type. Mentally add the required type in
i(angle bracket notation). E.g., tt(pair) may represent tt(pair<string,
int>).
it() The notation ti(Type) represents the i(generic type). tt(Type) could
be tt(int), tt(string), etc.
it() Identifiers tt(object) and tt(container) represent objects of the
container type under discussion.
it() The identifier tt(value) represents a value of the type that is
stored in the container.
it() Simple, one-letter identifiers, like tt(n) represent unsigned
values.
it() Longer identifiers represent i(iterators). Examples
are tt(pos), tt(from), tt(beyond)
)
Some containers, e.g., the tt(map) container, contain pairs of
values, usually called `keys' and `values'. For such containers the following
notational convention is used in addition:
itemization(
it() The identifier tt(key) indicates a value of the used key-type
it() The identifier tt(keyvalue) indicates a value of the `tt(value_type)'
used with the particular container.
)