File: hashKeyStack.cc

package info (click to toggle)
libosl 0.6.0-3.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 148,792 kB
  • ctags: 151,985
  • sloc: cpp: 131,133; ansic: 7,228; ruby: 1,290; makefile: 569; perl: 309; sh: 35
file content (42 lines) | stat: -rw-r--r-- 662 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* hashKeyStack.cc
 */
#include "osl/hash/hashKeyStack.h"
#include <boost/foreach.hpp>
#include <iostream>

osl::hash::
HashKeyStack::HashKeyStack(size_t capacity)
{
  data.reserve(capacity);
}

osl::hash::
HashKeyStack::~HashKeyStack()
{
}

void osl::hash::
HashKeyStack::push(const HashKey& key)
{
  data.push_back(key);
}

void osl::hash::
HashKeyStack::dump() const
{
#ifndef MINIMAL
  BOOST_FOREACH(const HashKey& key, data) {
    std::cerr << key << std::endl;
  }
#endif
}

bool osl::hash::operator==(const HashKeyStack& l, const HashKeyStack& r)
{
  return l.data == r.data;
}

// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End: