Browse Source

[4204fd] Renamed two context functions per Kea coding guidelines.

Marcin Siodelski 9 years ago
parent
commit
7b46431e34

+ 4 - 4
src/lib/eval/eval_context.cc

@@ -57,8 +57,8 @@ EvalContext::error (const std::string& what)
 }
 }
 
 
 uint16_t
 uint16_t
-EvalContext::convert_option_code(const std::string& option_code,
-                                 const isc::eval::location& loc)
+EvalContext::convertOptionCode(const std::string& option_code,
+                               const isc::eval::location& loc)
 {
 {
     int n = 0;
     int n = 0;
     try {
     try {
@@ -82,8 +82,8 @@ EvalContext::convert_option_code(const std::string& option_code,
 }
 }
 
 
 uint16_t
 uint16_t
-EvalContext::convert_option_name(const std::string& option_name,
-                                 const isc::eval::location& loc)
+EvalContext::convertOptionName(const std::string& option_name,
+                               const isc::eval::location& loc)
 {
 {
     OptionDefinitionPtr option_def = LibDHCP::getOptionDef(option_universe_,
     OptionDefinitionPtr option_def = LibDHCP::getOptionDef(option_universe_,
                                                            option_name);
                                                            option_name);

+ 4 - 4
src/lib/eval/eval_context.h

@@ -92,8 +92,8 @@ public:
     /// @result the option code
     /// @result the option code
     /// @throw calls the syntax error function if the value is no in
     /// @throw calls the syntax error function if the value is no in
     ///        the range 0..255 or 0..65535
     ///        the range 0..255 or 0..65535
-    uint16_t convert_option_code(const std::string& option_code,
-                                 const isc::eval::location& loc);
+    uint16_t convertOptionCode(const std::string& option_code,
+                               const isc::eval::location& loc);
 
 
     /// @brief Option name convertion
     /// @brief Option name convertion
     ///
     ///
@@ -101,8 +101,8 @@ public:
     /// @param loc the location of the token
     /// @param loc the location of the token
     /// @result the option code
     /// @result the option code
     /// @throw calls the syntax error function if the name cannot be resolved
     /// @throw calls the syntax error function if the name cannot be resolved
-    uint16_t convert_option_name(const std::string& option_name,
-                                 const isc::eval::location& loc);
+    uint16_t convertOptionName(const std::string& option_name,
+                               const isc::eval::location& loc);
 
 
  private:
  private:
     /// @brief Flag determining scanner debugging.
     /// @brief Flag determining scanner debugging.

+ 0 - 1
src/lib/eval/location.hh

@@ -1,4 +1,3 @@
-// Generated 20151125
 // A Bison parser, made by GNU Bison 3.0.4.
 // A Bison parser, made by GNU Bison 3.0.4.
 
 
 // Locations for Bison parsers in C++
 // Locations for Bison parsers in C++

+ 2 - 2
src/lib/eval/parser.cc

@@ -661,7 +661,7 @@ namespace isc { namespace eval {
   case 9:
   case 9:
 #line 114 "parser.yy" // lalr1.cc:859
 #line 114 "parser.yy" // lalr1.cc:859
     {
     {
-                     yylhs.value.as< uint16_t > () = ctx.convert_option_code(yystack_[0].value.as< std::string > (), yystack_[0].location);
+                     yylhs.value.as< uint16_t > () = ctx.convertOptionCode(yystack_[0].value.as< std::string > (), yystack_[0].location);
                  }
                  }
 #line 667 "parser.cc" // lalr1.cc:859
 #line 667 "parser.cc" // lalr1.cc:859
     break;
     break;
@@ -669,7 +669,7 @@ namespace isc { namespace eval {
   case 10:
   case 10:
 #line 118 "parser.yy" // lalr1.cc:859
 #line 118 "parser.yy" // lalr1.cc:859
     {
     {
-                     yylhs.value.as< uint16_t > () = ctx.convert_option_name(yystack_[0].value.as< std::string > (), yystack_[0].location);
+                     yylhs.value.as< uint16_t > () = ctx.convertOptionName(yystack_[0].value.as< std::string > (), yystack_[0].location);
                  }
                  }
 #line 675 "parser.cc" // lalr1.cc:859
 #line 675 "parser.cc" // lalr1.cc:859
     break;
     break;

+ 2 - 2
src/lib/eval/parser.yy

@@ -112,11 +112,11 @@ string_expr : STRING
 
 
 option_code : INTEGER
 option_code : INTEGER
                  {
                  {
-                     $$ = ctx.convert_option_code($1, @1);
+                     $$ = ctx.convertOptionCode($1, @1);
                  }
                  }
             | OPTION_NAME
             | OPTION_NAME
                  {
                  {
-                     $$ = ctx.convert_option_name($1, @1);
+                     $$ = ctx.convertOptionName($1, @1);
                  }
                  }
             ;
             ;
 
 

+ 0 - 1
src/lib/eval/position.hh

@@ -1,4 +1,3 @@
-// Generated 20151125
 // A Bison parser, made by GNU Bison 3.0.4.
 // A Bison parser, made by GNU Bison 3.0.4.
 
 
 // Positions for Bison parsers in C++
 // Positions for Bison parsers in C++

+ 0 - 1
src/lib/eval/stack.hh

@@ -1,4 +1,3 @@
-// Generated 20151125
 // A Bison parser, made by GNU Bison 3.0.4.
 // A Bison parser, made by GNU Bison 3.0.4.
 
 
 // Stack handling for Bison parsers in C++
 // Stack handling for Bison parsers in C++