29 #ifndef HOKUYO_ERRORS_H__
30 #define HOKUYO_ERRORS_H__
35 typedef unsigned char uint8_t;
36 typedef unsigned int uint32_t;
37 #if defined(HOKUYOAIST_STATIC)
38 #define HOKUYOAIST_EXPORT
39 #elif defined(hokuyoaist_EXPORTS)
40 #define HOKUYOAIST_EXPORT __declspec(dllexport)
42 #define HOKUYOAIST_EXPORT __declspec(dllimport)
46 #define HOKUYOAIST_EXPORT
58 char const*
const cmd);
73 BaseError(
unsigned int desc_code,
char const* error_type);
77 virtual unsigned int desc_code()
const throw()
78 {
return desc_code_; }
80 virtual char const* error_type()
const throw()
81 {
return error_type_; }
83 #if __cplusplus >= 201103L
84 virtual const char* what()
const throw();
86 virtual const char* what() throw();
174 unsigned int baud()
const throw()
177 #if __cplusplus >= 201103L
178 virtual const char* what()
const throw();
180 virtual const char* what() throw();
262 ArgError(
unsigned int desc_code,
char const* error_type)
366 calculated_(calculated)
370 calculated_(rhs.calculated())
373 virtual int expected()
const throw()
374 {
return expected_; }
376 virtual int calculated()
const throw()
377 {
return calculated_; }
379 #if __cplusplus >= 201103L
380 virtual const char* what()
const throw();
382 virtual const char* what() throw();
423 virtual char const*
const line()
const throw()
426 #if __cplusplus >= 201103L
427 virtual const char* what()
const throw();
429 virtual const char* what() throw();
446 ParseError(
char const*
const line,
char const*
const type);
449 virtual char const*
const line()
const throw()
452 virtual char const*
const type()
const throw()
455 #if __cplusplus >= 201103L
456 virtual const char* what()
const throw();
458 virtual const char* what() throw();
490 error_[0] = error[0]; error_[1] = error[1];
491 cmd_[0] = cmd[0]; cmd_[1] = cmd[1];
503 virtual char const*
const error_code()
const throw()
507 virtual char const*
const cmd_code()
const throw()
510 #if __cplusplus >= 201103L
511 virtual const char* what()
const throw();
513 virtual const char* what() throw();
534 error_(error), cmd_(cmd)
542 virtual char error_code()
const throw()
546 virtual char cmd_code()
const throw()
549 #if __cplusplus >= 201103L
550 virtual const char* what()
const throw();
552 virtual const char* what() throw();
574 cmd_[0] = cmd[0]; cmd_[1] = cmd[1];
575 echo_[0] = echo[0]; echo_[1] = echo[1];
587 virtual char const*
const cmd_code()
const throw()
591 virtual char const*
const cmd_echo()
const throw()
594 #if __cplusplus >= 201103L
595 virtual const char* what()
const throw();
597 virtual const char* what() throw();
618 cmd_[0] = cmd[0]; cmd_[1] = cmd[1];
628 virtual char const*
const cmd_code()
const throw()
631 #if __cplusplus >= 201103L
632 virtual const char* what()
const throw();
634 virtual const char* what() throw();
653 num_(num), line_length_(line_length)
657 line_length_(rhs.line_length())
660 virtual int num()
const throw()
663 virtual int line_length()
const throw()
664 {
return line_length_; }
666 #if __cplusplus >= 201103L
667 virtual const char* what()
const throw();
669 virtual const char* what() throw();
690 length_(length), expected_(expected)
694 expected_(rhs.expected())
697 virtual int length()
const throw()
700 virtual int expected()
const throw()
701 {
return expected_; }
703 #if __cplusplus >= 201103L
704 virtual const char* what()
const throw();
706 virtual const char* what() throw();
720 #endif // HOKUYO_ERRORS_H__