Sprout/sprout/compost/load/source.hpp
bolero-MURAKAMI d01ee064e2 fix weed warnings.
add compost library.
2012-11-09 01:09:49 +09:00

68 lines
2.4 KiB
C++

#ifndef COMPOST_DEF_LOAD_SOURCE_IDENTIFIER
# error should define COMPOST_DEF_LOAD_SOURCE_IDENTIFIER.
#endif
#ifndef COMPOST_DEF_LOAD_SOURCE_FILE
# error should define COMPOST_DEF_LOAD_SOURCE_FILE.
#endif
#ifndef COMPOST_DEF_LOAD_SOURCE_DATA_INDEX
# define COMPOST_DEF_LOAD_SOURCE_DATA_INDEX -1
#endif
#define COMPOST_LOAD_IDENTIFIER_DETAIL_CAT(id, suffix) COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_I(id, suffix)
#define COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_I(id, suffix) COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_II(id ## suffix)
#define COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_II(res) res
#define COMPOST_LOAD_DETAIL_IDENTIFIER(id) COMPOST_LOAD_IDENTIFIER_DETAIL_CAT( \
COMPOST_LOAD_IDENTIFIER_DETAIL_CAT(COMPOST_DEF_LOAD_SOURCE_IDENTIFIER, id), \
_compost_load_source_detail \
)
#define COMPOST_LOAD_IDENTIFIER COMPOST_DEF_LOAD_SOURCE_IDENTIFIER
#ifdef COMPOST_DEF_LOAD_INFO_IDENTIFIER
# define COMPOST_LOAD_INFO_IDENTIFIER COMPOST_DEF_LOAD_INFO_IDENTIFIER
#else
# define COMPOST_LOAD_INFO_IDENTIFIER COMPOST_LOAD_DETAIL_IDENTIFIER(info)
#endif
SPROUT_STATIC_CONSTEXPR sprout::compost::sources::version_type COMPOST_LOAD_DETAIL_IDENTIFIER(version) =
# define COMPOST_LOADING_SOURCE_VERSION
# include COMPOST_DEF_LOAD_SOURCE_FILE
# undef COMPOST_LOADING_SOURCE_VERSION
;
static_assert(COMPOST_LOAD_DETAIL_IDENTIFIER(version) <= 0, "Unsupported compost src version");
SPROUT_STATIC_CONSTEXPR sprout::compost::sources::info_type COMPOST_LOAD_INFO_IDENTIFIER = {
# define COMPOST_LOADING_SOURCE_INFO
# include COMPOST_DEF_LOAD_SOURCE_FILE
# undef COMPOST_LOADING_SOURCE_INFO
};
SPROUT_STATIC_CONSTEXPR sprout::compost::sources::sound_type<
COMPOST_LOAD_INFO_IDENTIFIER.size
> COMPOST_LOAD_IDENTIFIER(
COMPOST_LOAD_INFO_IDENTIFIER,
# define COMPOST_LOADING_SOURCE_DATA
# define COMPOST_LOADING_SOURCE_DATA_INDEX COMPOST_DEF_LOAD_SOURCE_DATA_INDEX
# include COMPOST_DEF_LOAD_SOURCE_FILE
# undef COMPOST_LOADING_SOURCE_DATA_INDEX
# undef COMPOST_LOADING_SOURCE_DATA
);
#undef COMPOST_LOAD_IDENTIFIER
#undef COMPOST_LOAD_INFO_IDENTIFIER
#undef COMPOST_LOAD_DETAIL_IDENTIFIER
#undef COMPOST_LOAD_IDENTIFIER_DETAIL_CAT
#undef COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_I
#undef COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_II
#undef COMPOST_DEF_LOAD_SOURCE_IDENTIFIER
#undef COMPOST_DEF_LOAD_SOURCE_FILE
#ifdef COMPOST_DEF_LOAD_INFO_IDENTIFIER
# undef COMPOST_DEF_LOAD_INFO_IDENTIFIER
#endif