Skip to content
Snippets Groups Projects
FilePointer.h 854 B
Newer Older
wfg's avatar
wfg committed
/*
wfg's avatar
wfg committed
 *
 *  Created on: Jan 6, 2017
 *      Author: wfg
 */

#ifndef FILEPOINTER_H_
#define FILEPOINTER_H_
/// \cond EXCLUDE_FROM_DOXYGEN
wfg's avatar
wfg committed
#include <stdio.h> // FILE*
wfg's avatar
wfg committed

#include "core/Transport.h"


namespace adios
{
 * Class that defines a transport method using C file pointer (FP) to streams FILE*
wfg's avatar
wfg committed
 */
class FilePointer : public Transport
    FilePointer( MPI_Comm mpiComm, const bool debugMode );
wfg's avatar
wfg committed

    void Open( const std::string name, const std::string accessMode );

    void SetBuffer( char* buffer, std::size_t size );

    void Write( const char* buffer, std::size_t size );

    void Flush( );

    void Close( );


private:

    FILE* m_File = NULL; ///< C file pointer

};


} //end namespace transport
wfg's avatar
wfg committed
} //end namespace




#endif /* FILEPOINTER_H_ */