1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* @file XabslFileInputSource.h
*
* Declaration of class XabslFileInputSource:
* reads a xabsl behavior from a file
*/

#ifndef _XabslFileInputSource_H
#define  _XabslFileInputSource_H

#include <XabslEngine/XabslTools.h>
#include <fstream>

class XabslFileInputSource : public xabsl::InputSource
{
public:
  XabslFileInputSource(std::string file);

  bool open();
  void close();
  double readValue();
  bool readString(char* destination, int maxLength);
  
  void skipComments();
  void skipWhiteSpace();

  virtual ~XabslFileInputSource();

private:
  std::string file;
  std::ifstream inFile;
};

#endif  /* _XabslFileInputSource_H */