Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

CCL.h

Go to the documentation of this file.
00001 // $Id: CCL.h,v 1.2 2005/09/02 23:00:06 vern Exp $
00002 //
00003 // Copyright (c) 1998, 1999, 2002
00004 //      The Regents of the University of California.  All rights reserved.
00005 //
00006 // Redistribution and use in source and binary forms, with or without
00007 // modification, are permitted provided that: (1) source code distributions
00008 // retain the above copyright notice and this paragraph in its entirety, (2)
00009 // distributions including binary code include the above copyright notice and
00010 // this paragraph in its entirety in the documentation or other materials
00011 // provided with the distribution, and (3) all advertising materials mentioning
00012 // features or use of this software display the following acknowledgement:
00013 // ``This product includes software developed by the University of California,
00014 // Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
00015 // the University nor the names of its contributors may be used to endorse
00016 // or promote products derived from this software without specific prior
00017 // written permission.
00018 // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
00019 // WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
00020 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00021 
00022 #ifndef ccl_h
00023 #define ccl_h
00024 
00025 #include "List.h"
00026 
00027 declare(List,ptr_compat_int);
00028 typedef List(ptr_compat_int) int_list;
00029 
00030 class CCL {
00031 public:
00032         CCL();
00033         ~CCL();
00034 
00035         void Add(int sym);
00036         void Negate();
00037         int IsNegated()         { return negated; }
00038         int Index()             { return index; }
00039 
00040         void Sort();
00041 
00042         int_list* Syms()        { return syms; }
00043 
00044         void ReplaceSyms(int_list* new_syms)
00045                                 { delete syms; syms = new_syms; }
00046 
00047         unsigned int MemoryAllocation() const
00048                 { return padded_sizeof(*this) + syms->MemoryAllocation(); }
00049 
00050 protected:
00051         int_list* syms;
00052         int negated;
00053         int index;
00054 };
00055 
00056 #endif

Generated on Wed Sep 14 02:55:59 2005 for bro_docs by doxygen 1.3.5