routing_table: Deduplicate rebuilds

We don't need to rebuild the routing table for every single interface
and system configuration object. It now only rebuilds the table once
every refresh of the object tree.

Change-Id: I6cc1cfa1ee6ad17307e3e9c7a2eaa352675ba7e8
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/routing_table.hpp b/src/routing_table.hpp
index 9b3b77e..efe054d 100644
--- a/src/routing_table.hpp
+++ b/src/routing_table.hpp
@@ -41,29 +41,25 @@
 class Table
 {
   public:
-    Table();
-    ~Table() = default;
-    Table(const Table&) = default;
-    Table& operator=(const Table&) = default;
-    Table(Table&&) = default;
-    Table& operator=(Table&&) = default;
+    /** @brief Rebuilds the routing table from the kernel */
+    void refresh();
 
     /**
      * @brief gets the default v4 gateway.
      *
      * @returns the default v4 gateway list.
      */
-    std::map<std::string, std::string> getDefaultGateway() const
+    inline const auto& getDefaultGateway() const
     {
         return defaultGateway;
-    };
+    }
 
     /**
      * @brief gets the default v6 gateway.
      *
      * @returns the default v6 gateway list.
      */
-    std::map<std::string, std::string> getDefaultGateway6() const
+    inline const auto& getDefaultGateway6() const
     {
         return defaultGateway6;
     };