QXRD  0.11.16
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
QcepImageDataFormatFactory< T > Class Template Reference

#include <qcepimagedataformatfactory.h>

Public Member Functions

 ~QcepImageDataFormatFactory ()
 
void insert (QcepImageDataFormat< T > *f)
 
QcepImageDataFormat< T > * canLoad (QString path)
 

Static Public Member Functions

static QcepImageDataFormatFactory< T > * factory ()
 

Private Member Functions

 QcepImageDataFormatFactory ()
 

Private Attributes

QList< QcepImageDataFormat< T > * > m_Formats
 

Static Private Attributes

static bool s_Created = false
 
static QcepImageDataFormatFactory< T > * s_Factory = NULL
 

Detailed Description

template<typename T>
class QcepImageDataFormatFactory< T >

Definition at line 12 of file qcepimagedataformatfactory.h.

Constructor & Destructor Documentation

template<typename T >
QcepImageDataFormatFactory< T >::QcepImageDataFormatFactory ( )
private

Definition at line 23 of file qcepimagedataformatfactory.cpp.

24 {
25 }
template<typename T >
QcepImageDataFormatFactory< T >::~QcepImageDataFormatFactory ( )

Definition at line 28 of file qcepimagedataformatfactory.cpp.

29 {
30  s_Created = false;
31 }

Member Function Documentation

template<typename T >
QcepImageDataFormat< T > * QcepImageDataFormatFactory< T >::canLoad ( QString  path)

Definition at line 40 of file qcepimagedataformatfactory.cpp.

References QcepImageDataFormat< T >::canLoadFile(), fmt, and QcepImageDataFormatBase::priority().

41 {
43  int priority = 0;
44  QcepImageDataFormat<T> *best=NULL;
45 
46  foreach(fmt, m_Formats) {
47  if (fmt->canLoadFile(path)) {
48  if (fmt->priority() > priority) {
49  best = fmt;
50  priority = fmt->priority();
51  }
52  }
53  }
54 
55  return best;
56 }
static QxrdImageDataFormatHis fmt
QList< QcepImageDataFormat< T > * > m_Formats
virtual Priority priority() const =0
virtual QcepImageDataFormat< T > * canLoadFile(QString path)=0

Here is the call graph for this function:

template<typename T >
QcepImageDataFormatFactory< T > * QcepImageDataFormatFactory< T >::factory ( )
static

Definition at line 12 of file qcepimagedataformatfactory.cpp.

Referenced by QcepImageDataFormat< T >::QcepImageDataFormat(), and QcepImageData< T >::readImage().

13 {
14  if (! s_Created) {
16  s_Created = true;
17  }
18 
19  return s_Factory;
20 }
static QcepImageDataFormatFactory< T > * s_Factory

Here is the caller graph for this function:

template<typename T >
void QcepImageDataFormatFactory< T >::insert ( QcepImageDataFormat< T > *  f)

Definition at line 34 of file qcepimagedataformatfactory.cpp.

35 {
36  m_Formats.append(fmt);
37 }
static QxrdImageDataFormatHis fmt
QList< QcepImageDataFormat< T > * > m_Formats

Member Data Documentation

template<typename T>
QList<QcepImageDataFormat<T>*> QcepImageDataFormatFactory< T >::m_Formats
private

Definition at line 28 of file qcepimagedataformatfactory.h.

template<typename T>
bool QcepImageDataFormatFactory< T >::s_Created = false
staticprivate

Definition at line 15 of file qcepimagedataformatfactory.h.

template<typename T>
QcepImageDataFormatFactory< T > * QcepImageDataFormatFactory< T >::s_Factory = NULL
staticprivate

Definition at line 16 of file qcepimagedataformatfactory.h.


The documentation for this class was generated from the following files: