LMCAS
Lamina Computer Algebra System
载入中...
搜索中...
未找到
LMCAS::property_detail 命名空间参考

函数

template<typename F>
PropertyStoreResult checked_property_update (PropertyStore &store, const std::string &symbol, const std::string &operation, F &&update)
std::string domain_str (Domain domain)
PropertyStoreResult invalid_empty_symbol (const std::string &operation)

函数说明

◆ checked_property_update()

template<typename F>
PropertyStoreResult LMCAS::property_detail::checked_property_update ( PropertyStore & store,
const std::string & symbol,
const std::string & operation,
F && update )

在文件 property_store_support.hpp 第 11 行定义.

14 {
15 if (symbol.empty()) {
16 return invalid_empty_symbol(operation);
17 }
18 try {
19 PropertyStore candidate = store;
20 update(candidate);
21 store = std::move(candidate);
22 } catch (const std::bad_alloc&) {
24 CasErrc::ResourceLimit, "property-store allocation failed", operation);
25 } catch (const std::invalid_argument& ex) {
26 return PropertyStoreResult::failure(CasErrc::InvalidArgument, ex.what(), operation);
27 } catch (const std::exception& ex) {
28 return PropertyStoreResult::failure(CasErrc::InternalInvariant, ex.what(), operation);
29 }
31}
static Result failure(CasErrc code, std::string message, std::string operation={})
static Result success()
PropertyStoreResult invalid_empty_symbol(const std::string &operation)

引用了 checked_property_update(), LMCAS::Result< void >::failure(), LMCAS::InternalInvariant, invalid_empty_symbol(), LMCAS::InvalidArgument, LMCAS::ResourceLimit , 以及 LMCAS::Result< void >::success().

被这些函数引用 checked_property_update().

函数调用图:
这是这个函数的调用关系图:

◆ domain_str()

std::string LMCAS::property_detail::domain_str ( Domain domain)

在文件 property_store_support.cpp 第 5 行定义.

5 {
6 static const std::pair<Domain, const char*> names[] = {
7 {Domain::Complex, "Complex"},
8 {Domain::Real, "Real"},
9 {Domain::Algebraic, "Algebraic"},
10 {Domain::Rational, "Rational"},
11 {Domain::Integer, "Integer"},
12 {Domain::Natural, "Natural"},
13 {Domain::PositiveInt, "PositiveInt"}
14 };
15 for (const auto& name : names) {
16 if (domain == name.first) return name.second;
17 }
18 return "Complex";
19}
@ Complex
Complex numbers (default, least specific)
@ Rational
Rational numbers
@ Natural
Non-negative integers (0, 1, 2, ...)
@ Real
Real numbers
@ Algebraic
Algebraic numbers (roots of polynomials with rational coefficients)
@ PositiveInt
Positive integers (1, 2, 3, ...)
const NumberDomainSet & domain
__attribute__((visibility("default"))) Result< EqvProfile > eqv_profile_from_name(const std const std::string & name

引用了 LMCAS::Algebraic, LMCAS::Complex, LMCAS::domain, domain_str(), LMCAS::Integer, LMCAS::name, LMCAS::Natural, LMCAS::PositiveInt, LMCAS::Rational , 以及 LMCAS::Real.

被这些函数引用 domain_str() , 以及 LMCAS::anonymous_namespace{assumption_serialization.cpp}::serialize_symbol_properties().

函数调用图:
这是这个函数的调用关系图:

◆ invalid_empty_symbol()

PropertyStoreResult LMCAS::property_detail::invalid_empty_symbol ( const std::string & operation)

在文件 property_store_support.cpp 第 20 行定义.

20 {
22 CasErrc::InvalidArgument, "symbol name must not be empty", operation);
23}

引用了 LMCAS::Result< void >::failure(), invalid_empty_symbol() , 以及 LMCAS::InvalidArgument.

被这些函数引用 checked_property_update() , 以及 invalid_empty_symbol().

函数调用图:
这是这个函数的调用关系图: