Skip to content
Snippets Groups Projects
Method.h 1.62 KiB
Newer Older
/*
 * Method.h
 *
 *  Created on: Dec 16, 2016
 *      Author: wfg
 */

#ifndef METHOD_H_
#define METHOD_H_

/// \cond EXCLUDE_FROM_DOXYGEN
#include <vector>
#include <string>
wfg's avatar
wfg committed
#include <map>


namespace adios
{

/**
 * Serves as metadata to define an engine
 */
wfg's avatar
wfg committed
class Method
wfg's avatar
wfg committed
    const std::string m_Type; ///< Method type
wfg's avatar
wfg committed
    const bool m_DebugMode = false; ///< true: on, throws exceptions and do additional checks, false: off, faster, but unsafe
    std::vector< std::map<std::string, std::string> > m_CapsuleParameters; ///< each is a separate Transport containing their own parameters
    std::vector< std::map<std::string, std::string> > m_TransportParameters; ///< each is a separate Transport containing their own parameters
wfg's avatar
wfg committed

    /**
     * Unique constructor, must have a type
     * @param type must be an engine type, default = SingleBP
     */
wfg's avatar
wfg committed
    Method( const std::string type, const bool debugMode = false );
wfg's avatar
wfg committed

    ~Method( );

    template< class ...Args>
    void AddCapsule( const std::string type, Args... args )
        std::vector<std::string> parameters = { args... };
        AddCapsuleParameters( type, parameters );
wfg's avatar
wfg committed
    }

    template< class ...Args>
    void AddTransport( const std::string type, Args... args )
        std::vector<std::string> parameters = { args... };
        AddTransportParameters( type, parameters );
    void AddCapsuleParameters( const std::string type, const std::vector<std::string>& parameters );
    void AddTransportParameters( const std::string type, const std::vector<std::string>& parameters );
};


} //end namespace


#endif /* METHOD_H_ */