~ubuntu-branches/ubuntu/precise/crossroads/precise

« back to all changes in this revision

Viewing changes to xr/backendvector/backendvector

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ritter
  • Date: 2010-07-05 16:27:00 UTC
  • Revision ID: james.westby@ubuntu.com-20100705162700-0g08tfav8ee9y51u
Tags: upstream-2.65
ImportĀ upstreamĀ versionĀ 2.65

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _BACKENDVECTOR_
 
2
#define _BACKENDVECTOR_
 
3
 
 
4
class BackendVector {
 
5
public:
 
6
    BackendVector(): vec(), is_defined(false)   {};
 
7
    bool isdefined() const                      { return is_defined; }
 
8
    void isdefined(bool i)                      { is_defined = i; }
 
9
    void add (unsigned nr)                      { vec.push_back(nr); }
 
10
    unsigned size() const                       { return vec.size(); }
 
11
    unsigned operator[] (unsigned index) const  { return vec[index]; }
 
12
private:
 
13
    vector<unsigned> vec;
 
14
    bool is_defined;
 
15
};
 
16
 
 
17
#endif