My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
AntennaException.h
Go to the documentation of this file.
1 #ifndef ANTENNAEXCEPTION_H
2 #define ANTENNAEXCEPTION_H
3 
11 #include "gcp/util/common/Exception.h"
12 
13 namespace gcp {
14  namespace antenna {
15  namespace control {
16 
18  public:
19 
20  enum Type {
21  ACU,
22  UNKNOWN,
23  };
24 
32  inline AntennaException(std::string str, const char * fileName,
33  const int lineNumber, Type type) :
34  gcp::util::Exception(str, fileName, lineNumber, true), type_(type) {}
35 
43  inline AntennaException(std::ostringstream& os, const char * fileName,
44  const int lineNumber, Type type) :
45  gcp::util::Exception(os, fileName, lineNumber, true), type_(type) {}
46 
51  const char* fileName, const int lineNumber,
52  Type type) :
53  gcp::util::Exception(ls, fileName, lineNumber, true), type_(type) {}
54 
59  const char* fileName, const int lineNumber,
60  Type type) :
61  gcp::util::Exception(ls, fileName, lineNumber, true), type_(type) {}
62 
66  inline void setAcu() {type_ = ACU;}
67 
71  inline bool isAcu() {return type_ == ACU;}
72 
73  private:
74 
75  Type type_;
76 
77  }; // End class AntennaException
78 
79  }; // End namespace control
80  }; // End namespace antenna
81 } // End namespace gcp
82 
83 #define AntError(x) AntennaException((x), __FILE__, __LINE__, \
84 AntennaException::UNKNOWN)
85 
86 #define AntErrorDef(x,y) AntennaException (x)((y), __FILE__, __LINE__, \
87 AntennaException::UNKNOWN))
88 
89 #define AcuError(x) AntennaException((x), __FILE__, __LINE__, \
90 AntennaException::ACU)
91 
92 #define AcuErrorDef(x,y) AntennaException (x)((y), __FILE__, __LINE__, \
93 AntennaException::ACU))
94 
95 #endif // End #ifndef
96 
97 
Definition: AntennaException.h:17
AntennaException(gcp::util::LogStream *ls, const char *fileName, const int lineNumber, Type type)
Definition: AntennaException.h:58
AntennaException(gcp::util::LogStream &ls, const char *fileName, const int lineNumber, Type type)
Definition: AntennaException.h:50
Definition: LogStream.h:21
AntennaException(std::ostringstream &os, const char *fileName, const int lineNumber, Type type)
Definition: AntennaException.h:43
void setAcu()
Definition: AntennaException.h:66
AntennaException(std::string str, const char *fileName, const int lineNumber, Type type)
Definition: AntennaException.h:32
bool isAcu()
Definition: AntennaException.h:71
Definition: Exception.h:30