Skip to content

File NPVDataInput.h

File List > core > NPVDataInput.h

Go to the documentation of this file

#ifndef NPVDataInput_h
#define NPVDataInput_h 1
#include <fstream>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
namespace nptool {
  class VDataInput {
   public:
    VDataInput();
    virtual ~VDataInput() = default;

   public:
    // Dump the required ascii file into the required folder
    // return path to the file
    // Should throw a warning exception if the file does not exist or if the
    // source does not support ascii file archival
    // std::string DumpAsciiFile(std::string name, std::string folder = "/tmp/") = 0;

   public:
    // Initialise the input
    virtual void Init(std::vector<std::string>) = 0;
    // use to attach link an object to the input
    virtual void Attach(std::string, std::string, void*) = 0;
    // return false on last entry
    virtual bool GetNextEntry() = 0;
    virtual long long GetCurrentEntryNumber() { return -1; };
    // return the number of entries in the file
    virtual long long GetEntries() { return -1; };
    // return the file size
    virtual long long GetFileSize() { return -1; };
    // return the size read so far
    virtual long long GetReadSize() { return -1; };

    // return true if the entry contain configuration file
    virtual bool HasConfigFile() = 0;
  };

} // namespace nptool
#endif