TuttleOFX  1
nodeDummy.hpp
Go to the documentation of this file.
00001 #ifndef _SAM_DO_NODE_DUMMY_HPP_
00002 #define _SAM_DO_NODE_DUMMY_HPP_
00003 
00004 #include <sam/common/options.hpp>
00005 
00006 #include <boost/program_options.hpp>
00007 
00008 #include "global.hpp"
00009 
00010 #define READER_DUMMY_SHORTNAME "r"
00011 #define READER_DUMMY_NAME      "reader"
00012 #define READER_DUMMY_FULLNAME  "dummy.reader"
00013 
00014 #define WRITER_DUMMY_SHORTNAME "w"
00015 #define WRITER_DUMMY_NAME      "writer"
00016 #define WRITER_DUMMY_FULLNAME  "dummy.writer"
00017 
00018 namespace bpo = boost::program_options;
00019 
00020 namespace sam {
00021 namespace samdo {
00022 
00023 typedef std::vector<ttl::ofx::imageEffect::OfxhImageEffectPlugin*> NodeList;
00024 typedef ttl::ofx::imageEffect::OfxhImageEffectPlugin::ContextSet   NodeContext;
00025 
00026 struct Dummy
00027 {
00028         bool isDummyReaderNode( const std::string& nodeName );
00029         bool isDummyWriterNode( const std::string& nodeName );
00030         bool isDummyNode      ( const std::string& nodeName );
00031         
00032         void getFullName( std::string& inputNode );
00033         
00034         bpo::options_description getInfoOptions();
00035         bpo::options_description getConfOptions();
00036         bpo::options_description getOpenFXOptions();
00037         
00038         void getCommandLineParameters    ( bpo::variables_map& node_vm, const std::vector<std::string>& nodeArgs );
00039         void getParametersFromCommandLine( std::vector<std::string>& parameters, const std::vector<std::string>& nodeArgs );
00040         void getPathsFromCommandLine     ( std::vector<std::string>& paths, const std::vector<std::string>& nodeArgs );
00041         void getExtensionsFromCommandLine( std::vector<std::string>& extensions, const std::vector<std::string>& nodeArgs );
00042         
00043         void addDummyNodeInList( std::vector<std::string>& list );
00044         void addFullNameDummyNodeInList( std::vector<std::string>& list );
00045         void addShortNameDummyNodeInList( std::vector<std::string>& list );
00046         
00047         std::vector<std::string> getAllSupportedNodes( const std::string& context );
00048         std::vector<std::string> getSupportedExtensions( const std::string& context );
00049         
00050         void printAllSupportedNodes( const std::string& context );
00051         void printAllSupportedExtensions( const std::string& context );
00052         
00053         void displayHelp( const std::string& nodeFullName );
00054         void displayExpertHelp( const std::string& nodeFullName );
00055         
00056         void foundAssociateSpecificDummyNode( std::string& inputNode, const std::string& dummyNodeName, const NodeList& nodeList, const std::vector<std::string>& nodeArgs );
00057         void foundAssociateDummyNode( std::string& inputNode, const std::vector<ttl::ofx::imageEffect::OfxhImageEffectPlugin*>& nodeList, const std::vector<std::string>& nodeArgs );
00058 };
00059 
00060 }
00061 }
00062 #endif