1 /* 2 * MessagePack for C++ version information 3 * 4 * Copyright (C) 2008-2013 FURUHASHI Sadayuki and Takatoshi Kondo 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 #ifndef MSGPACK_VERSION_HPP 19 #define MSGPACK_VERSION_HPP 20 21 #include "version_master.h" 22 23 #define MSGPACK_STR(v) #v 24 #define MSGPACK_VERSION_I(maj, min, rev) MSGPACK_STR(maj) "." MSGPACK_STR(min) "." MSGPACK_STR(rev) 25 26 #define MSGPACK_VERSION MSGPACK_VERSION_I(MSGPACK_VERSION_MAJOR, MSGPACK_VERSION_MINOR, MSGPACK_VERSION_REVISION) 27 msgpack_version(void)28inline const char* msgpack_version(void) { 29 return MSGPACK_VERSION; 30 } 31 msgpack_version_major(void)32inline int msgpack_version_major(void) { 33 return MSGPACK_VERSION_MAJOR; 34 } 35 msgpack_version_minor(void)36inline int msgpack_version_minor(void) { 37 return MSGPACK_VERSION_MINOR; 38 } 39 msgpack_version_revision(void)40inline int msgpack_version_revision(void) { 41 return MSGPACK_VERSION_REVISION; 42 } 43 44 #endif /* msgpack/version.hpp */ 45