45 struct ICLUtils_API FileImplDelOp {
static void delete_func(FileImpl *i); };
74 static std::string read_file(
const std::string &filename,
bool textMode=
true);
77 static std::vector<std::string> read_lines(
const std::string &filename);
80 static void write_file(
const std::string &filename,
const std::string &
text,
84 static void write_lines(
const std::string &filename,
const std::vector<std::string> &lines);
91 File(
const std::string &name);
94 File(
const std::string &name, OpenMode om);
103 bool isDirectory()
const;
109 bool isBinary()
const;
112 std::string getDir()
const;
115 std::string getBaseName()
const;
118 std::string getSuffix()
const;
121 std::string getName()
const;
124 void write(
const void *
data,
int len);
128 void writeLine(
const void *
data,
int len);
131 void write(
const std::string &
text);
134 void setPrecision(
const std::string &p=
"%8f");
160 std::string readLine()
const;
166 std::string &readLine(std::string &dst)
const;
169 const std::vector<icl8u> &readAll()
const;
172 const icl8u* getCurrentDataPointer()
const;
175 const icl8u* getFileDataPointer()
const;
181 std::vector<icl8u> read(
int len)
const;
185 int read(
int len,
void *dst)
const;
188 bool hasMoreLines()
const;
191 int bytesAvailable()
const;
194 int getFileSize()
const;
198 void open(OpenMode om);
202 void reopen(OpenMode om);
214 void *getHandle()
const;
217 bool canRead()
const;
220 bool canWrite()
const;
223 OpenMode getOpenMode()
const;
undocument this line if you encounter any issues!
Definition: Any.h:37
OpenMode
mode to open files
Definition: File.h:65
Ipp8u icl8u
8Bit unsigned integer type for the ICL
Definition: BasicTypes.h:64
Interface class for cheap copyable classes using a smart ptr.
Definition: ShallowCopyable.h:131
#define ICLUtils_API
this macros are important for creating dll's
Definition: CompatMacros.h:171
ICLQt_API void text(ImgQ &image, int x, int y, const string &text)
renders a text into an image (only available with Qt-Support)
Utility class for file handling (reading files is buffered)
Definition: File.h:61
ICLQt_API ImgROI data(ImgQ &r)
creates full ROI ROI-struct
ICLUtils_API std::ostream & operator<<(std::ostream &s, const ConfigFile &cf)
Default ostream operator to put a ConfigFile into a stream.