ifilter.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 2001-2006, William Joseph.
00003 All Rights Reserved.
00004 
00005 This file is part of GtkRadiant.
00006 
00007 GtkRadiant is free software; you can redistribute it and/or modify
00008 it under the terms of the GNU General Public License as published by
00009 the Free Software Foundation; either version 2 of the License, or
00010 (at your option) any later version.
00011 
00012 GtkRadiant is distributed in the hope that it will be useful,
00013 but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with GtkRadiant; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 */
00021 
00022 #if !defined(INCLUDED_IFILTER_H)
00023 #define INCLUDED_IFILTER_H
00024 
00025 #include "generic/constant.h"
00026 
00027 enum {
00028     EXCLUDE_WORLD               = 0x00000001,
00029     EXCLUDE_ENT                 = 0x00000002,
00030     EXCLUDE_TRANSLUCENT         = 0x00000004,
00031     EXCLUDE_LIQUIDS             = 0x00000008,
00032     EXCLUDE_CAULK               = 0x00000010,
00033     EXCLUDE_CLIP                = 0x00000020,
00034     EXCLUDE_ACTORCLIP           = 0x00000040,
00035     EXCLUDE_WEAPONCLIP          = 0x00000080,
00036     EXCLUDE_LIGHTS              = 0x00000100,
00037     EXCLUDE_DETAILS             = 0x00000200,
00038     EXCLUDE_HINTSSKIPS          = 0x00000400,
00039     EXCLUDE_MODELS              = 0x00000800,
00040     EXCLUDE_TRIGGERS            = 0x00001000,
00041     EXCLUDE_TERRAIN             = 0x00002000,
00042     EXCLUDE_NODRAW              = 0x00004000,
00043     EXCLUDE_STRUCTURAL          = 0x00008000,
00044     EXCLUDE_NO_SURFLIGHTS       = 0x00010000,
00045     EXCLUDE_PHONG               = 0x00020000,
00046     EXCLUDE_NO_FOOTSTEPS        = 0x00040000,
00047     EXCLUDE_PARTICLE            = 0x00080000,
00048     EXCLUDE_INFO_PLAYER_START   = 0x00100000,
00049     EXCLUDE_INFO_HUMAN_START    = 0x00200000,
00050     EXCLUDE_INFO_ALIEN_START    = 0x00400000,
00051     EXCLUDE_INFO_2x2_START      = 0x00800000,
00052     EXCLUDE_INFO_CIVILIAN_START = 0x01000000,
00053     EXCLUDE_INFO                = 0x02000000,
00054 };
00055 
00056 class Filter {
00057 public:
00058     virtual ~Filter(){}
00059     virtual void setActive(bool active) = 0;
00060 };
00061 
00065 class Filterable {
00066 public:
00067     virtual ~Filterable(){}
00068     virtual void updateFiltered() = 0;
00069 };
00070 
00071 class FilterSystem {
00072 public:
00073     INTEGER_CONSTANT(Version, 1);
00074     STRING_CONSTANT(Name, "filters");
00075     virtual ~FilterSystem(){}
00076     virtual void addFilter(Filter& filter, int mask) = 0;
00077     virtual void registerFilterable(Filterable& filterable) = 0;
00078     virtual void unregisterFilterable(Filterable& filterable) = 0;
00079 };
00080 
00081 #include "modulesystem.h"
00082 
00083 template<typename Type>
00084 class GlobalModule;
00085 typedef GlobalModule<FilterSystem> GlobalFilterModule;
00086 
00087 template<typename Type>
00088 class GlobalModuleRef;
00089 typedef GlobalModuleRef<FilterSystem> GlobalFilterModuleRef;
00090 
00091 inline FilterSystem& GlobalFilterSystem() {
00092     return GlobalFilterModule::getTable();
00093 }
00094 
00095 #endif

Generated by  doxygen 1.6.2