summaryrefslogtreecommitdiff
path: root/pmt/src/lib/unv_template.h.t
blob: 6a084ec5012d02e9f4a55c6906708241a5b4dc42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

////////////////////////////////////////////////////////////////////////////
//                           pmt_@TAG@vector
////////////////////////////////////////////////////////////////////////////

class pmt_@TAG@vector : public pmt_uniform_vector
{
  std::vector< @TYPE@ >	d_v;

public:
  pmt_@TAG@vector(size_t k, @TYPE@ fill);
  pmt_@TAG@vector(size_t k, const @TYPE@ *data);
  // ~pmt_@TAG@vector();

  bool is_@TAG@vector() const { return true; }
  size_t length() const { return d_v.size(); }
  @TYPE@ ref(size_t k) const;
  void set(size_t k, @TYPE@ x);
  const @TYPE@ *elements(size_t &len);
  @TYPE@ *writeable_elements(size_t &len);
  const void *uniform_elements(size_t &len);
  void *uniform_writeable_elements(size_t &len);
};