00001 /* 00002 * HT Editor 00003 * stddata.h 00004 * 00005 * Copyright (C) 1999-2002 Sebastian Biallas (sb@web-productions.de) 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License version 2 as 00009 * published by the Free Software Foundation. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 */ 00020 00021 #ifndef STDDATA_H 00022 #define STDDATA_H 00023 00024 #include "common.h" 00025 00026 struct area_s { 00027 area_s *left, *right; 00028 Object *start, *end; 00029 }; 00030 00031 class Area: public Object { 00032 public: 00033 area_s *a; 00034 00035 void init(); 00036 int load(ht_object_stream *f); 00037 virtual void done(); 00038 OBJECT_ID object_id() const; 00039 00040 void add(Object *Start, Object *End); 00041 bool contains(Object *V); 00042 area_s *getArea(Object *at); 00043 Object *findNext(Object *From); 00044 Object *findPrev(Object *From); 00045 void freeRecursive(area_s *p); 00046 virtual void store(ht_object_stream *f); 00047 #ifdef DEBUG_FIXNEW 00048 void dump(); 00049 #endif 00050 }; 00051 00052 #define ATOM_AREA MAGICD("AREA") 00053 00054 bool init_stddata(); 00055 void done_stddata(); 00056 00057 #endif