Lines Matching full:model
29 #include "model/metadata.hpp"
34 #include "model/exceptions.hpp"
35 #include "model/types.hpp"
272 model::strings_set());
274 model::strings_set());
281 model::strings_set());
283 tree.set< paths_set_node >("required_files", model::paths_set());
285 tree.set< paths_set_node >("required_programs", model::paths_set());
318 /// \throw model::error If the key is not known or if the value is not valid.
326 throw model::error(F("Unknown metadata property %s") % key);
328 throw model::error(F("Invalid value for metadata property %s: %s") %
341 /// \throw model::error If the key is not known or if the value is not valid.
350 throw model::error(F("Unknown metadata property %s") % key);
352 throw model::error(F("Invalid value for metadata property %s: %s") %
362 struct model::metadata::impl : utils::noncopyable {
391 model::metadata::metadata(const utils::config::tree& props) :
398 model::metadata::~metadata(void)
409 model::metadata
410 model::metadata::apply_overrides(const metadata& overrides) const
419 const model::strings_set&
420 model::metadata::allowed_architectures(void) const
435 const model::strings_set&
436 model::metadata::allowed_platforms(void) const
451 model::properties_map
452 model::metadata::custom(void) const
462 model::metadata::description(void) const
476 model::metadata::execenv(void) const
490 model::metadata::execenv_jail_params(void) const
506 model::metadata::has_cleanup(void) const
520 model::metadata::has_execenv(void) const
532 model::metadata::is_exclusive(void) const
545 const model::strings_set&
546 model::metadata::required_configs(void) const
562 model::metadata::required_disk_space(void) const
575 const model::paths_set&
576 model::metadata::required_files(void) const
590 model::metadata::required_memory(void) const
603 const model::paths_set&
604 model::metadata::required_programs(void) const
618 model::metadata::required_user(void) const
633 model::metadata::timeout(void) const
646 model::properties_map
647 model::metadata::to_properties(void) const
660 model::metadata::operator==(const metadata& other) const
672 model::metadata::operator!=(const metadata& other) const
685 model::operator<<(std::ostream& output, const metadata& object)
690 const model::properties_map props = object.to_properties();
691 for (model::properties_map::const_iterator iter = props.begin();
706 struct model::metadata_builder::impl : utils::noncopyable {
722 /// \param base The base model to construct a copy from.
723 impl(const model::metadata& base) :
732 model::metadata_builder::metadata_builder(void) :
739 model::metadata_builder::metadata_builder(const model::metadata& base) :
746 model::metadata_builder::~metadata_builder(void)
757 /// \throw model::error If the value is invalid.
758 model::metadata_builder&
759 model::metadata_builder::add_allowed_architecture(const std::string& arch)
779 /// \throw model::error If the value is invalid.
780 model::metadata_builder&
781 model::metadata_builder::add_allowed_platform(const std::string& platform)
802 /// \throw model::error If the value is invalid.
803 model::metadata_builder&
804 model::metadata_builder::add_custom(const std::string& key,
818 /// \throw model::error If the value is invalid.
819 model::metadata_builder&
820 model::metadata_builder::add_required_config(const std::string& var)
840 /// \throw model::error If the value is invalid.
841 model::metadata_builder&
842 model::metadata_builder::add_required_file(const fs::path& path)
860 /// \throw model::error If the value is invalid.
861 model::metadata_builder&
862 model::metadata_builder::add_required_program(const fs::path& path)
881 /// \throw model::error If the value is invalid.
882 model::metadata_builder&
883 model::metadata_builder::set_allowed_architectures(
884 const model::strings_set& as)
897 /// \throw model::error If the value is invalid.
898 model::metadata_builder&
899 model::metadata_builder::set_allowed_platforms(const model::strings_set& ps)
912 /// \throw model::error If the value is invalid.
913 model::metadata_builder&
914 model::metadata_builder::set_custom(const model::properties_map& props)
916 for (model::properties_map::const_iterator iter = props.begin();
930 /// \throw model::error If the value is invalid.
931 model::metadata_builder&
932 model::metadata_builder::set_description(const std::string& description)
945 /// \throw model::error If the value is invalid.
946 model::metadata_builder&
947 model::metadata_builder::set_execenv(const std::string& name)
960 /// \throw model::error If the value is invalid.
961 model::metadata_builder&
962 model::metadata_builder::set_execenv_jail_params(const std::string& params)
975 /// \throw model::error If the value is invalid.
976 model::metadata_builder&
977 model::metadata_builder::set_has_cleanup(const bool cleanup)
990 /// \throw model::error If the value is invalid.
991 model::metadata_builder&
992 model::metadata_builder::set_is_exclusive(const bool exclusive)
1005 /// \throw model::error If the value is invalid.
1006 model::metadata_builder&
1007 model::metadata_builder::set_required_configs(const model::strings_set& vars)
1020 /// \throw model::error If the value is invalid.
1021 model::metadata_builder&
1022 model::metadata_builder::set_required_disk_space(const units::bytes& bytes)
1035 /// \throw model::error If the value is invalid.
1036 model::metadata_builder&
1037 model::metadata_builder::set_required_files(const model::paths_set& files)
1050 /// \throw model::error If the value is invalid.
1051 model::metadata_builder&
1052 model::metadata_builder::set_required_memory(const units::bytes& bytes)
1065 /// \throw model::error If the value is invalid.
1066 model::metadata_builder&
1067 model::metadata_builder::set_required_programs(const model::paths_set& progs)
1080 /// \throw model::error If the value is invalid.
1081 model::metadata_builder&
1082 model::metadata_builder::set_required_user(const std::string& user)
1096 /// \throw model::error If the value is invalid or the key does not exist.
1097 model::metadata_builder&
1098 model::metadata_builder::set_string(const std::string& key,
1104 throw model::format_error(F("Unknown metadata property %s") % key);
1106 throw model::format_error(
1119 /// \throw model::error If the value is invalid.
1120 model::metadata_builder&
1121 model::metadata_builder::set_timeout(const datetime::delta& timeout)
1137 model::metadata
1138 model::metadata_builder::build(void) const