Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

BitSet.hpp

Go to the documentation of this file.
00001 #ifndef INC_BitSet_hpp__
00002 #define INC_BitSet_hpp__
00003 
00004 /* ANTLR Translator Generator
00005  * Project led by Terence Parr at http://www.jGuru.com
00006  * Software rights: http://www.antlr.org/license.html
00007  *
00008  * $Id: BitSet.hpp,v 1.1 2004/10/08 16:27:34 dfisher Exp $
00009  */
00010 
00011 #include <antlr/config.hpp>
00012 #include <vector>
00013 #include <stdexcept>
00014 
00015 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
00016 namespace antlr {
00017 #endif
00018 
00040 class ANTLR_API BitSet {
00041 private:
00042         ANTLR_USE_NAMESPACE(std)vector<bool> storage;
00043 
00044 public:
00045         BitSet( unsigned int nbits=64 );
00046         BitSet( const unsigned long* bits_, unsigned int nlongs);
00047         ~BitSet();
00048 
00049         void add( unsigned int el );
00050 
00051         bool member( unsigned int el ) const;
00052 
00053         ANTLR_USE_NAMESPACE(std)vector<unsigned int> toArray() const;
00054 };
00055 
00056 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
00057 }
00058 #endif
00059 
00060 #endif //INC_BitSet_hpp__

Generated on Wed Nov 3 12:58:51 2004 for Lemur Toolkit by doxygen1.2.18