#ifndef LIBREPOMGR_BUILD_ACTION_TEMPLATE_H #define LIBREPOMGR_BUILD_ACTION_TEMPLATE_H #include "./buildactionmeta.h" #include #include #include namespace LibRepoMgr { struct LIBREPOMGR_EXPORT BuildActionTemplate : public ReflectiveRapidJSON::JsonSerializable { std::string directory; std::vector packageNames; std::vector sourceDbs, destinationDbs; std::unordered_map settings; BuildActionFlagType flags = noBuildActionFlags; BuildActionType type = BuildActionType::Invalid; CppUtilities::TimeSpan maxFrequency = CppUtilities::TimeSpan::infinity(); }; struct BuildActionSequenceNode; struct LIBREPOMGR_EXPORT BuildActionSequenceData : public ReflectiveRapidJSON::JsonSerializable { std::string name; bool concurrent = false; }; struct LIBREPOMGR_EXPORT BuildActionSequenceNodes : public ReflectiveRapidJSON::JsonSerializable { std::vector actions; }; struct LIBREPOMGR_EXPORT BuildActionSequence : public BuildActionSequenceData, public BuildActionSequenceNodes { }; struct LIBREPOMGR_EXPORT BuildActionSequenceNode : public std::variant { }; struct LIBREPOMGR_EXPORT BuildTask : public BuildActionSequence, public ReflectiveRapidJSON::JsonSerializable { std::string desc; std::string category; CppUtilities::TimeSpan frequency = CppUtilities::TimeSpan::infinity(); }; struct LIBREPOMGR_EXPORT BuildPresets : public ReflectiveRapidJSON::JsonSerializable { std::unordered_map templates; std::unordered_map tasks; }; } // namespace LibRepoMgr namespace ReflectiveRapidJSON { namespace JsonReflector { // declare custom (de)serialization for BuildActionSequence template <> LIBREPOMGR_EXPORT void push( const LibRepoMgr::BuildActionSequence &reflectable, RAPIDJSON_NAMESPACE::Value &value, RAPIDJSON_NAMESPACE::Document::AllocatorType &allocator); template <> LIBREPOMGR_EXPORT void pull(LibRepoMgr::BuildActionSequence &reflectable, const RAPIDJSON_NAMESPACE::GenericValue> &value, JsonDeserializationErrors *errors); // declare custom (de)serialization for BuildActionSequenceNode template <> LIBREPOMGR_EXPORT void push(const LibRepoMgr::BuildActionSequenceNode &reflectable, RAPIDJSON_NAMESPACE::Value &value, RAPIDJSON_NAMESPACE::Document::AllocatorType &allocator); template <> LIBREPOMGR_EXPORT void pull(LibRepoMgr::BuildActionSequenceNode &reflectable, const RAPIDJSON_NAMESPACE::GenericValue> &value, JsonDeserializationErrors *errors); } // namespace JsonReflector } // namespace ReflectiveRapidJSON #endif // LIBREPOMGR_BUILD_ACTION_TEMPLATE_H