HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
imageRegistry.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_IMAGING_HIO_IMAGE_REGISTRY_H
8 #define PXR_IMAGING_HIO_IMAGE_REGISTRY_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/imaging/hio/api.h"
12 #include "pxr/base/tf/singleton.h"
13 
14 #include <memory>
15 #include <string>
16 
18 
19 using HioImageSharedPtr = std::shared_ptr<class HioImage>;
20 
21 class HioRankedTypeMap;
22 
23 /// \class HioImageRegistry
24 ///
25 /// Manages plugin registration and loading for HioImage subclasses.
26 ///
27 class HioImageRegistry : public TfSingleton<HioImageRegistry>
28 {
29 public:
30  HIO_API
31  static HioImageRegistry& GetInstance();
32 
33  HIO_API
34  bool IsSupportedImageFile(std::string const & filename);
35 
36 private:
39 
40  friend class HioImage;
41 
42  HioImageSharedPtr _ConstructImage(std::string const & filename);
43 
44 private:
45  std::unique_ptr<HioRankedTypeMap> const _typeMap;
46 };
47 
49 
50 #endif // PXR_IMAGING_HIO_IMAGE_REGISTRY_H
static HIO_API HioImageRegistry & GetInstance()
GT_API const UT_StringHolder filename
#define HIO_API
Definition: api.h:23
HIO_API bool IsSupportedImageFile(std::string const &filename)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
std::shared_ptr< class HioImage > HioImageSharedPtr
Definition: image.h:27
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
Definition: image.h:37