Remove dynamic exceptions
[anna.git] / source / diameter / core / functions.cpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite                           //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9 // Local
10 #include <anna/diameter/functions.hpp>
11
12 #include <anna/core/functions.hpp>
13
14 using namespace anna::diameter;
15
16
17 std::string functions::avpIdAsPairString(const AvpId & avpId) {
18   std::string result;
19   result = "(";
20   result += anna::functions::asString(avpId.first);
21   result += ",";
22   result += anna::functions::asString(avpId.second);
23   result += ")";
24   return (result);
25 }
26
27
28 std::string functions::commandIdAsPairString(const CommandId & commandId) {
29   std::string result;
30   result = "(";
31   result += anna::functions::asString(commandId.first);
32   result += ",";
33   result += (commandId.second ? "request" : "answer");
34   result += ")";
35   return (result);
36 }
37