Katana Plug-in APIs 0.1

FnResolutionTable.h

00001 // Copyright (c) 2011 The Foundry Visionmongers Ltd. All Rights Reserved.
00002 
00003 #ifndef FnGeolibServicesResolutionTable_H
00004 #define FnGeolibServicesResolutionTable_H
00005 
00006 #include <vector>
00007 #include <string>
00008 #include <memory>
00009 
00010 #include <FnGeolibServices/FnGeolibServicesAPI.h>
00011 #include <FnGeolibServices/ns.h>
00012 #include <FnGeolibServices/suite/FnResolutionTableSuite.h>
00013 
00014 FNGEOLIBSERVICES_NAMESPACE_ENTER
00015 {
00020     class FNGEOLIBSERVICES_API FnResolutionTableEntry
00021     {
00022     public:
00023         typedef std::shared_ptr<FnResolutionTableEntry> Ptr;
00024 
00025         FnResolutionTableEntry(FnResolutionTableEntryHandle handle);
00026         ~FnResolutionTableEntry();
00027 
00028         std::string name() const;
00029         int xres() const;
00030         int yres() const;
00031         float aspectRatio() const;
00032         std::string fullName() const;
00033         std::string proxyName() const;
00034         std::string groupName() const;
00035 
00036     private:
00037         FnResolutionTableEntryHandle _handle;
00038     };
00039 
00040     namespace FnResolutionTable
00041     {
00042         FNGEOLIBSERVICES_API
00043         bool hasResolution(const std::string& name);
00044 
00045         FNGEOLIBSERVICES_API
00046         FnResolutionTableEntry::Ptr getResolution(const std::string& name);
00047 
00048         FNGEOLIBSERVICES_API
00049         FnResolutionTableEntry::Ptr findResolution(int xres,
00050                                                    int yres,
00051                                                    float aspectRatio);
00052         FNGEOLIBSERVICES_API
00053         std::string extractValidResolutionName(const std::string& str);
00054 
00055         FNGEOLIBSERVICES_API
00056         void getGroups(std::vector<std::string>& outGroups);
00057 
00058         FNGEOLIBSERVICES_API
00059         void getEntries(std::vector<FnResolutionTableEntry::Ptr>& outEntries);
00060 
00061         FNGEOLIBSERVICES_API
00062         void getEntriesForGroup(
00063             const std::string& group,
00064             std::vector<FnResolutionTableEntry::Ptr>& outEntries);
00065     }
00067 }
00068 FNGEOLIBSERVICES_NAMESPACE_EXIT
00069 
00070 #endif // FnGeolibServicesResolutionTable_H
 All Classes Functions Variables Typedefs Enumerations Enumerator