From 1ad276f889c5dd08f268c632c5d64b6dbfc9ffae Mon Sep 17 00:00:00 2001 From: Byn Choi Date: Mon, 27 Jun 2016 23:49:33 +0000 Subject: [PATCH] Adding missing inline decls for - fully-specialized templated functions - implemented functions in header files --- include/pcp-cpp/atom.hpp | 4 ++-- include/pcp-cpp/cache.hpp | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/pcp-cpp/atom.hpp b/include/pcp-cpp/atom.hpp index ab7d32f..e41fbf4 100644 --- a/include/pcp-cpp/atom.hpp +++ b/include/pcp-cpp/atom.hpp @@ -70,7 +70,7 @@ pmAtomValue atom(const atom_type_type type, ValueType value) * @return A `pmAtomValue` containing \c value of type \c type. */ template <> -pmAtomValue atom(const atom_type_type type, char * value) +inline pmAtomValue atom(const atom_type_type type, char * value) { pmAtomValue atom; switch (type) { @@ -102,7 +102,7 @@ pmAtomValue atom(const atom_type_type type, char * value) * @return A `pmAtomValue` containing \c value of type \c type. */ template <> -pmAtomValue atom(const atom_type_type type, pmValueBlock * value) +inline pmAtomValue atom(const atom_type_type type, pmValueBlock * value) { pmAtomValue atom; switch (type) { diff --git a/include/pcp-cpp/cache.hpp b/include/pcp-cpp/cache.hpp index 5a60f76..9a98ca8 100644 --- a/include/pcp-cpp/cache.hpp +++ b/include/pcp-cpp/cache.hpp @@ -207,7 +207,7 @@ lookup_result_type lookup(const pmInDom indom, const std::string &name, * * @see pmdaCacheOp */ -int perform(const pmInDom indom, const int operation) +inline int perform(const pmInDom indom, const int operation) { const int result = pmdaCacheOp(indom, operation); if (result < 0) { @@ -229,7 +229,7 @@ int perform(const pmInDom indom, const int operation) * * @see pmdaCachePurge */ -size_t purge(const pmInDom indom, const time_t recent) +inline size_t purge(const pmInDom indom, const time_t recent) { const int result = pmdaCachePurge(indom, recent); if (result < 0) { @@ -252,7 +252,7 @@ size_t purge(const pmInDom indom, const time_t recent) * * @see pmdaCachePurge */ -size_t purge(const pmInDom indom, const boost::posix_time::time_duration &recent) +inline size_t purge(const pmInDom indom, const boost::posix_time::time_duration &recent) { return purge(indom, recent.total_seconds()); } @@ -272,9 +272,9 @@ size_t purge(const pmInDom indom, const boost::posix_time::time_duration &recent * * @see pmdaCacheStore */ -instance_id_type store(const pmInDom indom, const std::string &name, - const int flags = PMDA_CACHE_ADD, - void * const opaque = NULL) +inline instance_id_type store(const pmInDom indom, const std::string &name, + const int flags = PMDA_CACHE_ADD, + void * const opaque = NULL) { const int result = pmdaCacheStore(indom, flags, name.c_str(), opaque); if (result < 0) { @@ -297,8 +297,8 @@ instance_id_type store(const pmInDom indom, const std::string &name, * * @see pmdaCacheStore */ -instance_id_type store(const pmInDom indom, const std::string &name, - void * const opaque, const int flags = PMDA_CACHE_ADD) +inline instance_id_type store(const pmInDom indom, const std::string &name, + void * const opaque, const int flags = PMDA_CACHE_ADD) { const int result = pmdaCacheStore(indom, flags, name.c_str(), opaque); if (result < 0) { @@ -323,9 +323,9 @@ instance_id_type store(const pmInDom indom, const std::string &name, * * @see pmdaCacheStoreKey */ -instance_id_type store(const pmInDom indom, const std::string &name, - const std::string &key, const int flags = 0, - void * const opaque = NULL) +inline instance_id_type store(const pmInDom indom, const std::string &name, + const std::string &key, const int flags = 0, + void * const opaque = NULL) { const int result = pmdaCacheStoreKey(indom, flags, name.c_str(), key.size(), key.c_str(), opaque); @@ -351,9 +351,9 @@ instance_id_type store(const pmInDom indom, const std::string &name, * * @see pmdaCacheStoreKey */ -instance_id_type store(const pmInDom indom, const std::string &name, - const std::string &key, void * const opaque, - const int flags = 0) +inline instance_id_type store(const pmInDom indom, const std::string &name, + const std::string &key, void * const opaque, + const int flags = 0) { const int result = pmdaCacheStoreKey(indom, flags, name.c_str(), key.size(), key.c_str(), opaque);