BoolVector.h
00001 #ifndef bcv_h
00002 #define bcv_h
00003
00004 #ifdef HAVE_CONFIG_H
00005 #include "OPT++_config.h"
00006 #endif
00007
00008 #include <iostream>
00009 #ifdef HAVE_STD
00010 #include <cstdlib>
00011 #else
00012 #include <stdlib.h>
00013 #endif
00014
00015 namespace OPTPP {
00016
00023 class BoolVector
00024 {
00026 int size;
00028 bool *p;
00029
00030 public:
00036 BoolVector(int sz);
00043 BoolVector(int sz, const bool & val);
00050 BoolVector(int sz, const BoolVector & val);
00054 BoolVector(const BoolVector & val);
00055
00060 BoolVector(void ) {p = new bool[size = 100];}
00064 ~BoolVector(void ) {delete []p;}
00065
00069 int Size(void) {return size;}
00070
00074 bool &operator()( int index );
00078 const bool &operator()( int index ) const ;
00079
00083 BoolVector& operator=(const BoolVector& val);
00084 };
00085
00086 }
00087 #endif