epoc32/include/stdapis/stlport/bitset
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
/*
williamr@4
     2
 * Copyright (c) 1998
williamr@4
     3
 * Silicon Graphics Computer Systems, Inc.
williamr@4
     4
 *
williamr@4
     5
 * Copyright (c) 1999 
williamr@4
     6
 * Boris Fomitchev
williamr@4
     7
 *
williamr@4
     8
 * This material is provided "as is", with absolutely no warranty expressed
williamr@4
     9
 * or implied. Any use is at your own risk.
williamr@4
    10
 *
williamr@4
    11
 * Permission to use or copy this software for any purpose is hereby granted 
williamr@4
    12
 * without fee, provided the above notices are retained on all copies.
williamr@4
    13
 * Permission to modify the code and to distribute modified code is granted,
williamr@4
    14
 * provided the above notices are retained, and a notice that the code was
williamr@4
    15
 * modified is included with the above copyright notice.
williamr@4
    16
 *
williamr@4
    17
 */
williamr@4
    18
williamr@4
    19
#ifndef _STLP_BITSET
williamr@4
    20
#define _STLP_BITSET
williamr@4
    21
williamr@4
    22
// This implementation of bitset<> has a second template parameter,
williamr@4
    23
// _WordT, which defaults to unsigned long.  *YOU SHOULD NOT USE
williamr@4
    24
// THIS FEATURE*.  It is experimental, and it may be removed in
williamr@4
    25
// future releases.
williamr@4
    26
williamr@4
    27
// A bitset of size N, using words of type _WordT, will have 
williamr@4
    28
// N % (sizeof(_WordT) * CHAR_BIT) unused bits.  (They are the high-
williamr@4
    29
// order bits in the highest word.)  It is a class invariant
williamr@4
    30
// of class bitset<> that those unused bits are always zero.
williamr@4
    31
williamr@4
    32
// Most of the actual code isn't contained in bitset<> itself, but in the 
williamr@4
    33
// base class _Base_bitset.  The base class works with whole words, not with
williamr@4
    34
// individual bits.  This allows us to specialize _Base_bitset for the
williamr@4
    35
// important special case where the bitset is only a single word.
williamr@4
    36
williamr@4
    37
// The C++ standard does not define the precise semantics of operator[].
williamr@4
    38
// In this implementation the const version of operator[] is equivalent
williamr@4
    39
// to test(), except that it does no range checking.  The non-const version
williamr@4
    40
// returns a reference to a bit, again without doing any range checking.
williamr@4
    41
williamr@4
    42
# ifndef _STLP_OUTERMOST_HEADER_ID
williamr@4
    43
#  define _STLP_OUTERMOST_HEADER_ID 0x2
williamr@4
    44
#  include <stl/_prolog.h>
williamr@4
    45
# endif
williamr@4
    46
williamr@4
    47
#ifdef _STLP_PRAGMA_ONCE
williamr@4
    48
# pragma once
williamr@4
    49
#endif
williamr@4
    50
williamr@4
    51
# include <stl/_bitset.h>
williamr@4
    52
williamr@4
    53
# if (_STLP_OUTERMOST_HEADER_ID == 0x2 )
williamr@4
    54
#  include <stl/_epilog.h>
williamr@4
    55
#  undef _STLP_OUTERMOST_HEADER_ID
williamr@4
    56
# endif
williamr@4
    57
williamr@4
    58
#endif /* _STLP_BITSET */
williamr@4
    59
williamr@4
    60
williamr@4
    61
// Local Variables:
williamr@4
    62
// mode:C++
williamr@4
    63
// End:
williamr@4
    64