/*------------------------------------------------------------------------------
 src/lib/djImage/djImageApp.h
 
 Copyright (c) 2004-2006 Darby Johnston.
 All rights reserved.
 Use is subject to license terms.
------------------------------------------------------------------------------*/

#ifndef DJ_IMAGE_APP_H
#define DJ_IMAGE_APP_H
#include <djAppBase.h>
#include <djImageOp.h>
#include <djImageIo.h>

namespace dj {

// Image application base.
//
class ImageApp : public AppBase {
public:

  ImageApp(const Str & name, int & argc, char ** argv);
  virtual ~ImageApp();
  
  // Plugins.
  //
  ImageOpFactory & imageOp() { return _imageOpFactory; }
  ImageLoadFactory & imageLoad() { return _imageLoadFactory; }
  ImageSaveFactory & imageSave() { return _imageSaveFactory; }

private:

  void imageFactoryInit();

  ImageOpFactory _imageOpFactory;
  ImageLoadFactory _imageLoadFactory;
  ImageSaveFactory _imageSaveFactory;
};

// Global application pointer.
//
#define djImageApp (static_cast<dj::ImageApp *>(djAppBase))

}

#endif
