source: to-imperative/trunk/libp++/pxx_vector.hh @ 1039

Last change on this file since 1039 was 1039, checked in by sveta, 18 years ago
  • Library VECTOR.

: ----------------------------------------------------------------------

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 656 bytes
Line 
1#ifndef __pxx_vector_hh__
2#define __pxx_vector_hh__
3
4#include "pxx_common.hh"
5#include "pxx_exception.hh"
6
7namespace pxx
8{
9
10template <typename type_t>
11class Vector
12{
13
14private:
15
16  type_t* data ;
17  size_t length ;
18  size_t capacity ;
19
20public:
21
22  Vector (size_t _length = 0) ;
23  Vector (Vector const& _s) ;
24  ~Vector () ;
25  Vector& operator = (Vector const& _s) ;
26
27  type_t const* get_data () const ;
28
29  void expand (size_t _extra) ;
30  void decrease (size_t _extra);
31  type_t const& operator [] (size_t _index) const ;
32  type_t& operator [] (size_t _index) ;
33  size_t get_length () const ;
34  size_t get_capacity () const ;
35
36};
37
38}
39
40#endif // __pxx_vector_hh__
Note: See TracBrowser for help on using the repository browser.