GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: include/sot/pattern-generator/exception-pg.h Lines: 0 3 0.0 %
Date: 2023-06-05 08:59:09 Branches: 0 0 - %

Line Branch Exec Source
1
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2
 * Copyright Projet JRL-Japan, 2008
3
 *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4
 *
5
 * File:      ExceptionPatternGenerator.h
6
 * Project:   SOT
7
 * Author:    Olivier Stasse
8
 *
9
 * Version control
10
 * ===============
11
 *
12
 *  $Id$
13
 *
14
 * Description
15
 * ============
16
 *
17
 *
18
 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
19
20
#ifndef __SOT_PATTERN_GENERATOR_EXCEPTION_H
21
#define __SOT_PATTERN_GENERATOR_EXCEPTION_H
22
23
/* --------------------------------------------------------------------- */
24
/* --- INCLUDE --------------------------------------------------------- */
25
/* --------------------------------------------------------------------- */
26
27
#include <sot/core/exception-abstract.hh>
28
29
/* --------------------------------------------------------------------- */
30
/* --- API ------------------------------------------------------------- */
31
/* --------------------------------------------------------------------- */
32
33
#if defined(WIN32)
34
#if defined(exception_pg_EXPORTS)
35
#define EXCEPTION_PG_EXPORT __declspec(dllexport)
36
#else
37
#define EXCEPTION_PG_EXPORT __declspec(dllimport)
38
#endif
39
#else
40
#define EXCEPTION_PG_EXPORT
41
#endif
42
43
/* --------------------------------------------------------------------- */
44
/* --- CLASS ----------------------------------------------------------- */
45
/* --------------------------------------------------------------------- */
46
47
namespace dynamicgraph {
48
namespace sot {
49
50
/* \class ExceptionPatternGenerator
51
 */
52
class EXCEPTION_PG_EXPORT ExceptionPatternGenerator : public ExceptionAbstract {
53
 public:
54
  enum ErrorCodeEnum {
55
    GENERIC = ExceptionAbstract::PATTERN_GENERATOR,
56
    READ_FILE,
57
    CANT_DESTROY_SIGNAL,
58
    JOINT_RANK,
59
    PATTERN_GENERATOR_JRL,
60
    SELECTOR_RANK,
61
    BAD_CAST
62
  };
63
64
  static const std::string EXCEPTION_NAME;
65
  virtual const std::string &getExceptionName(void) const {
66
    return EXCEPTION_NAME;
67
  }
68
69
 public:
70
  ExceptionPatternGenerator(
71
      const ExceptionPatternGenerator::ErrorCodeEnum &errcode,
72
      const std::string &msg = "");
73
  ExceptionPatternGenerator(
74
      const ExceptionPatternGenerator::ErrorCodeEnum &errcode,
75
      const std::string &msg, const char *format, ...);
76
  virtual ~ExceptionPatternGenerator(void) throw() {}
77
};
78
79
}  // namespace sot
80
}  // namespace dynamicgraph
81
82
#endif /* #ifndef __SOT_PATTERN_GENERATOR_EXCEPTION_H */