//=-- AccessFilterPlugin.h - Superclass of all Filters -----------------------=
//
//  This class provides an interface to filter accesses against rules, 
//  rejecting accesses the user doesn't want, and potentially modifying other
//  accesses...
//
//=---------------------------------------------------------------------------=
//  This file is copyright (c) 1997-2000 Chris Lattner
//=---------------------------------------------------------------------------=

#ifndef ACCESS_FILTER_PLUGIN_H
#define ACCESS_FILTER_PLUGIN_H

#include "Plugin.h"
class AccessFormatPlugin;
class VTListExp;

class MSAPI AccessFilterPlugin : public Plugin {
public:
  AccessFilterPlugin(const String &name) : Plugin(name) { }
  virtual ~AccessFilterPlugin() { }

  // FilterAccess - Process access, if the access is to be rejected, and not 
  // included in the reports, return a true value.
  //
  virtual int FilterAccess(AccessFormatPlugin &) {
    return 0;
  }

  virtual int Initialize(const VTListExp *) { return 0; }

  inline static PluginType GetPluginType() { 
    return Plugin::ACCESS_FILTER_PLUGIN; 
  }

  static AccessFilterPlugin *CreatePlugin(const String &Name) {
    return (AccessFilterPlugin *)Plugin::CreatePlugin(
                          Plugin::ACCESS_FILTER_PLUGIN, Name);
  }
};

#endif
