本文整理汇总了C++中BlockModel::check方法的典型用法代码示例。如果您正苦于以下问题:C++ BlockModel::check方法的具体用法?C++ BlockModel::check怎么用?C++ BlockModel::check使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlockModel
的用法示例。
在下文中一共展示了BlockModel::check方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NumberSource
NumberSource (const BlockModel& al)
: Number (al),
source (Librarian::build_item<Source> (al, "source")),
begin (al.check ("begin") ? new Time (al.submodel ("begin")) : NULL),
end (al.check ("end") ? new Time (al.submodel ("end")) : NULL),
state (uninitialized),
val (-42.42e42)
{ }
示例2: Reaction
ReactionDenit::ReactionDenit (const BlockModel& al)
: Reaction (al),
K (al.number ("K")),
K_fast (al.number ("K_fast", K)),
alpha (al.number ("alpha")),
alpha_fast (al.number ("alpha_fast", alpha)),
heat_factor (al.check ("heat_factor")
? al.plf ("heat_factor")
: PLF::empty ()),
water_factor (al.plf ("water_factor")),
water_factor_fast (al.check ("water_factor_fast" )
? al.plf ("water_factor_fast")
: water_factor),
redox_height (al.number ("redox_height", 1.0))
{ }
示例3:
std::unique_ptr<Volume>
Volume::build_obsolete (const BlockModel& al)
{
Volume *const vol = Librarian::build_item<Volume> (al, "volume");
daisy_assert (vol);
if (al.check ("from"))
{
const double from = al.number ("from");
if (from < 0)
vol->limit_top (from);
}
if (al.check ("to"))
{
const double to = al.number ("to");
if (to < 0)
vol->limit_bottom (to);
}
return std::unique_ptr<Volume> (vol);
}
示例4: ActionWaitDays
ActionWaitDays (const BlockModel& al)
: Action (al),
days (al.integer ("days")),
hours (al.integer ("hours")),
activated (al.check ("end_time")),
end_time (1, 1, 1, 1)
{
if (activated)
end_time = Time (al.submodel ("end_time"));
}
示例5: ActionRepeat
ActionRepeat (const BlockModel& al)
: Action (al),
metalib (al.metalib ()),
modified_frame (Action::frame (), FrameModel::parent_link),
repeat (&al.model ("repeat").clone ()),
action (al.check ("do")
? Librarian::build_item<Action> (al, "do")
: Librarian::build_item<Action> (al, "repeat"))
{
if (!modified_frame.check ("do"))
modified_frame.set ("do", *repeat);
}
示例6: Drain
DrainLateral::DrainLateral (const BlockModel& al)
: Drain (al),
eq_depth (Librarian::build_item<Draineqd> (al, "eq_depth")),
L (al.number ("L")),
rad (al.number ("rad")),
x (al.number ("x", L / 2.0)),
pipe_position (al.number ("pipe_position")),
pipe_outlet (al.check ("pipe_outlet")
? Librarian::build_item<Depth> (al, "pipe_outlet")
: Depth::create (pipe_position)),
K_to_pipes_ (al.number ("K_to_pipes", -1.0)),
pipe_level (pipe_position),
height (al.number ("height", pipe_position))
{ }
示例7: anisotropy
Horizon::Implementation::Implementation (const BlockModel& al)
: dry_bulk_density (al.number ("dry_bulk_density", -42.42e42)),
SOM_C_per_N (al.number_sequence ("SOM_C_per_N")),
C_per_N (al.number ("C_per_N", -42.42e42)),
SOM_fractions (al.check ("SOM_fractions")
? al.number_sequence ("SOM_fractions")
: std::vector<double> ()),
turnover_factor (al.number ("turnover_factor")),
anisotropy (al.number ("anisotropy")),
attributes (get_attributes (al.submodel_sequence ("attributes"))),
dimensions (get_dimensions (al.submodel_sequence ("attributes"))),
nitrification (Librarian::build_item<Nitrification> (al, "Nitrification")),
secondary (Librarian::build_item<Secondary> (al, "secondary_domain")),
r_pore_min (al.number ("r_pore_min")),
primary_sorption_fraction (NAN),
hor_heat (al.submodel ("HorHeat")),
CEC (al.number ("CEC", -42.42e42))
{ }