### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe »
- Package::safe.postprocessors »

# Module: safe.postprocessors.abstract_postprocessor

Abstract postprocessor class, do not instantiate directly

class `safe.postprocessors.abstract_postprocessor.``AbstractPostprocessor`

  Abstract postprocessor class, do not instantiate directly. but instantiate the PostprocessorFactory class which will take care of setting up many prostprocessors. Alternatively you can as well instantiate directly a sub class of AbstractPostprocessor.

  Each subclass has to overload the process method and call its parent like this: AbstractPostprocessor.process(self) if a postprocessor needs parmeters, then it should override the setup and clear methods as well and call respectively AbstractPostprocessor.setup(self) and AbstractPostprocessor.clear(self).

  for implementation examples see AgePostprocessor which uses mandatory and optional parameters

  `clear`()

    Abstract method to be called from the concrete implementation with AbstractPostprocessor.process(self) it takes care of results being cleared

    Args:
      None
    Returns:
      None
    Raises:
      None
  `process`()

    Abstract method to be called from the concrete implementation with AbstractPostprocessor.process(self) it takes care of results being initialized

    Args:
      None
    Returns:
      None
    Raises:
      None
  `results`()

    Returns the postprocessors results

    Args:
      None
    Returns:
      Odict of results
    Raises:
      None
  `setup`(params)

    Abstract method to be called from the concrete implementation with AbstractPostprocessor.setup(self, None) it takes care of results being initialized

    Args:
      params: dict of parameters to pass to the post processor
    Returns:
      None
    Raises:
      None

This module forms part of the InaSAFE tool.

### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe »
- Package::safe.postprocessors »