12#ifndef __CommandStyleFileReader_h
13#define __CommandStyleFileReader_h
251#define frSetErrorMsgMacro(x) \
253 std::ostringstream msg; \
254 msg << "ERROR: In " << __FILE__ << ", line " << __LINE__ \
255 << "\n" << this << ": " << x << "\n"; \
256 SetError(msg.str()); \
263#define frSetDebugMsgMacro(x) \
267 std::ostringstream msg; \
268 msg << "Debug: In " << __FILE__ << ", line " << __LINE__ \
269 << "\n" << this << ": " << x << "\n"; \
270 DebugMessage (msg.str()); \
278#define frSetWarningMsgMacro(x) \
280 std::ostringstream msg; \
281 msg << "WARNING: In " << __FILE__ << ", line " << __LINE__ \
282 << "\n" << this << ": " << x << "\n"; \
283 WarningMessage (msg.str()); \
An abstract base class for reading data files that are structured as text with a fixed maximum line l...
virtual void SetDebug(int d)
virtual int FindCommand()
virtual void DebugMessage(const std::string &msg)
virtual int ProcessCommand()
CommandStyleFileReader(std::istream &stream)
std::stack< CommandContext_t > commandContextStack
virtual int IsCommand()=0
int RegisterCommandHandler(const char *commandName, CommandHandler_t handler)
std::map< std::string, CommandHandler_t > CommandContext_t
virtual int CallCommandHandler(CommandHandler_t handler)
virtual int IsCommentLine()=0
virtual void SetError(const std::string &msg)
virtual void WarningMessage(const std::string &msg)
int(CommandStyleFileReader::* CommandHandler_t)()
const char * GetErrorMsg()