Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Enumerations
scanline_status.h File Reference
#include <cstdarg>
#include "pagespeed/kernel/base/printf_format.h"
#include "pagespeed/kernel/base/string.h"
#include "pagespeed/kernel/base/string_util.h"

Go to the source code of this file.

Classes

class  pagespeed::image_compression::ScanlineStatus
 

Namespaces

 pagespeed
 for size_t
 

Macros

#define PAGESPEED_SCANLINE_STATUS(_X)
 
#define PAGESPEED_SCANLINE_STATUS_SOURCE(_X)
 
#define PAGESPEED_SCANLINE_STATUS_ENUM_NAME(_Y)   _Y
 
#define PAGESPEED_SCANLINE_STATUS_ENUM_STRING(_Y)   #_Y
 
#define PS_LOGGED_STATUS(_LOGGER, _HANDLER, _TYPE, _SOURCE,...)
 

Enumerations

enum  ScanlineStatusType
 
enum  ScanlineStatusSource
 

Macro Definition Documentation

#define PAGESPEED_SCANLINE_STATUS (   _X)
Value:
_X(SCANLINE_STATUS_UNINITIALIZED), \
_X(SCANLINE_STATUS_SUCCESS), \
_X(SCANLINE_STATUS_UNSUPPORTED_FORMAT), \
_X(SCANLINE_STATUS_UNSUPPORTED_FEATURE), \
_X(SCANLINE_STATUS_PARSE_ERROR), \
_X(SCANLINE_STATUS_MEMORY_ERROR), \
_X(SCANLINE_STATUS_INTERNAL_ERROR), \
_X(SCANLINE_STATUS_TIMEOUT_ERROR), \
_X(SCANLINE_STATUS_INVOCATION_ERROR), \
\
_X(NUM_SCANLINE_STATUS)
#define PAGESPEED_SCANLINE_STATUS_SOURCE (   _X)
Value:
_X(SCANLINE_UNKNOWN), \
_X(SCANLINE_PNGREADER), \
_X(SCANLINE_PNGREADERRAW), \
_X(SCANLINE_GIFREADER), \
_X(SCANLINE_GIFREADERRAW), \
_X(SCANLINE_JPEGREADER), \
_X(SCANLINE_WEBPREADER), \
_X(SCANLINE_RESIZER), \
_X(SCANLINE_PNGWRITER), \
_X(SCANLINE_JPEGWRITER), \
_X(SCANLINE_WEBPWRITER), \
_X(SCANLINE_UTIL), \
_X(SCANLINE_PIXEL_FORMAT_OPTIMIZER), \
_X(FRAME_TO_SCANLINE_READER_ADAPTER), \
_X(FRAME_TO_SCANLINE_WRITER_ADAPTER), \
_X(SCANLINE_TO_FRAME_READER_ADAPTER), \
_X(SCANLINE_TO_FRAME_WRITER_ADAPTER), \
_X(FRAME_GIFREADER), \
_X(FRAME_WEBPWRITER), \
_X(FRAME_PADDING_READER), \
\
_X(NUM_SCANLINE_SOURCE)

Note the source of the error message by means of an enum rather than a string.

#define PS_LOGGED_STATUS (   _LOGGER,
  _HANDLER,
  _TYPE,
  _SOURCE,
  ... 
)
Value:
(_LOGGER(_HANDLER, #_SOURCE "/" #_TYPE " " __VA_ARGS__), \
ScanlineStatus::New(_TYPE, _SOURCE, __VA_ARGS__))

Convenience macro for simultaneously logging error descriptions and creating a ScanlineStatus with that error description. _LOGGER is meant to be one of the PS_LOG* macros defined in message_handler.h.