OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine/identifier.cpp

Copyright Matus Chochlik. Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

#include <iostream>
//------------------------------------------------------------------------------
static inline void print_info(eagine::identifier id) {
std::cout << id.name() << ':' << std::endl;
std::cout << " size: " << id.size() << std::endl;
std::cout << " max_size: " << id.max_size() << std::endl;
std::cout << " sizeof: " << sizeof(id) << std::endl;
std::cout << " value: " << id.value() << std::endl;
}
//------------------------------------------------------------------------------
#if EAGINE_HAS_LONG_ID
static inline void print_info(eagine::long_identifier id) {
std::cout << id.name() << ':' << std::endl;
std::cout << " size: " << id.size() << std::endl;
std::cout << " max_size: " << id.max_size() << std::endl;
std::cout << " sizeof: " << sizeof(id) << std::endl;
}
#endif
//------------------------------------------------------------------------------
auto main() -> int {
using namespace eagine;
print_info(EAGINE_ID(foo));
print_info(EAGINE_ID(bar));
print_info(EAGINE_ID(foobarbaz));
print_info(EAGINE_ID(0123456789));
#if EAGINE_HAS_LONG_ID
print_info(EAGINE_LONG_ID(ThisIsSomeVeryLongId));
#endif
return 0;
}
#define EAGINE_ID(NAME)
Macro for constructing instances of eagine::identifier.
Definition: identifier.hpp:353
Common code is placed in this namespace.
Definition: eagine.hpp:21
#define EAGINE_LONG_ID(NAME)
Macro for constructing instances of eagine::long_identifier.
Definition: identifier.hpp:393

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).