messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers version.hpp Source File

version.hpp

00001 /*
00002  * MessagePack for C++ version information
00003  *
00004  * Copyright (C) 2008-2013 FURUHASHI Sadayuki and Takatoshi Kondo
00005  *
00006  *    Distributed under the Boost Software License, Version 1.0.
00007  *    (See accompanying file LICENSE_1_0.txt or copy at
00008  *    http://www.boost.org/LICENSE_1_0.txt)
00009  */
00010 #ifndef MSGPACK_VERSION_HPP
00011 #define MSGPACK_VERSION_HPP
00012 
00013 #include "../version_master.h"
00014 
00015 #define MSGPACK_STR(v) #v
00016 #define MSGPACK_VERSION_I(maj, min, rev) MSGPACK_STR(maj) "." MSGPACK_STR(min) "." MSGPACK_STR(rev)
00017 
00018 #define MSGPACK_VERSION MSGPACK_VERSION_I(MSGPACK_VERSION_MAJOR, MSGPACK_VERSION_MINOR, MSGPACK_VERSION_REVISION)
00019 
00020 inline const char* msgpack_version(void) {
00021     return MSGPACK_VERSION;
00022 }
00023 
00024 inline int msgpack_version_major(void) {
00025     return MSGPACK_VERSION_MAJOR;
00026 }
00027 
00028 inline int msgpack_version_minor(void) {
00029     return MSGPACK_VERSION_MINOR;
00030 }
00031 
00032 inline int msgpack_version_revision(void) {
00033     return MSGPACK_VERSION_REVISION;
00034 }
00035 
00036 #endif /* msgpack/version.hpp */