/usr/include/osl/hash/hashKeyStack.h is in libosl-dev 0.6.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 43 44 | /* hashKeyStack.h
*/
#ifndef HASH_HASHKEYSTACK_H
#define HASH_HASHKEYSTACK_H
#include "osl/hash/hashKey.h"
#include "osl/stl/vector.h"
namespace osl
{
namespace hash
{
class HashKeyStack
{
typedef vector<HashKey> vector_t;
vector_t data;
public:
explicit HashKeyStack(size_t capacity=0);
~HashKeyStack();
void push(const HashKey&);
void pop() { assert(! data.empty()); data.pop_back(); }
void clear() { data.clear(); }
const HashKey& top(size_t n=0) const
{
assert(n < size());
vector_t::const_reverse_iterator p=data.rbegin()+n;
return *p;
}
bool empty() const { return data.empty(); }
size_t size() const { return data.size(); }
void dump() const;
friend bool operator==(const HashKeyStack&, const HashKeyStack&);
};
} // namespace hash
using hash::HashKeyStack;
} // namespace osl
#endif /* HASH_HASHKEYSTACK_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
|