本文整理汇总了C++中ParentObject类的典型用法代码示例。如果您正苦于以下问题:C++ ParentObject类的具体用法?C++ ParentObject怎么用?C++ ParentObject使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ParentObject类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setParent
// set the parent, child may have to call methods on the parent
bool InsideSurfaceConvectionAlgorithm_Impl::setParent(ParentObject& newParent)
{
if (newParent.optionalCast<SimulationControl>() && (newParent.model() == model())) {
return true;
}
return false;
}
示例2: setParent
bool ConvergenceLimits_Impl::setParent(ParentObject& newParent)
{
if (newParent.optionalCast<SimulationControl>() && (newParent.model() == model())) {
return true;
}
return false;
}
示例3: setParent
// set the parent, child may have to call methods on the parent
bool RunPeriod_Impl::setParent(ParentObject& newParent)
{
if (newParent.optionalCast<SimulationControl>() && (newParent.model() == model())) {
return true;
}
return false;
}
示例4: setParent
bool WeatherFile_Impl::setParent(ParentObject& newParent)
{
if (newParent.optionalCast<Site>() && (newParent.model() == model())){
return true;
}
return false;
}
示例5: setParent
// set the parent, child may have to call methods on the parent
bool SizingPeriod_Impl::setParent(ParentObject& newParent)
{
if (newParent.optionalCast<Site>() && (newParent.model() == model())) {
return true;
}
return false;
}
示例6: setParent
// set the parent, child may have to call methods on the parent
bool HeatBalanceAlgorithm_Impl::setParent(ParentObject& newParent)
{
if (newParent.optionalCast<SimulationControl>() && (newParent.model() == model())) {
return true;
}
return false;
}
示例7: setParent
// set the parent, child may have to call methods on the parent
bool ZoneAirContaminantBalance_Impl::setParent(ParentObject& newParent)
{
if (newParent.optionalCast<SimulationControl>() && (newParent.model() == model())) {
return true;
}
return false;
}
示例8: setParent
// set the parent, child may have to call methods on the parent
bool RunPeriodControlSpecialDays_Impl::setParent(ParentObject& newParent)
{
if (newParent.optionalCast<YearDescription>() && (newParent.model() == model())) {
return true;
}
return false;
}
示例9: setParent
bool ScheduleRule_Impl::setParent(ParentObject& newParent)
{
bool result = false;
if (newParent.optionalCast<ScheduleRuleset>()){
result = setPointer(OS_Schedule_RuleFields::ScheduleRulesetName, newParent.handle());
}
return result;
}
示例10: setParent
bool ScheduleDay_Impl::setParent(ParentObject& newParent) {
if (OptionalScheduleRule scheduleRule = newParent.optionalCast<ScheduleRule>()) {
if (getObject<ScheduleDay>().getModelObjectSources<ModelObject>().empty()) {
bool result = newParent.setPointer(OS_Schedule_RuleFields::DayScheduleName, handle());
OS_ASSERT(result);
return true;
}
}
return false;
}
示例11: getRecursiveChildren
std::vector<ModelObject> getRecursiveChildren(const ParentObject& object, bool includeLifeCycleCosts) {
std::set<Handle> resultSet;
std::pair<HandleSet::const_iterator,bool> insertResult;
std::vector<ModelObject> result;
resultSet.insert(object.handle());
result.push_back(object);
if (includeLifeCycleCosts){
for (const LifeCycleCost& lifeCycleCost : object.lifeCycleCosts()){
result.push_back(lifeCycleCost);
}
}
std::deque<ParentObject> parents;
parents.push_back(object);
while (parents.size() > 0) {
ParentObject currentParent(parents[0]);
parents.pop_front();
// parent's costs have already been added
for (const ModelObject& child : currentParent.children()) {
insertResult = resultSet.insert(child.handle());
if (insertResult.second) {
result.push_back(child);
if (includeLifeCycleCosts){
for (const LifeCycleCost& lifeCycleCost : child.lifeCycleCosts()){
result.push_back(lifeCycleCost);
}
}
OptionalParentObject opo = child.optionalCast<ParentObject>();
if (opo) {
parents.push_back(*opo);
}
}
}
}
return result;
}
示例12: setParent
bool ClimateZones_Impl::setParent(ParentObject& newParent) {
if ( newParent.optionalCast<Site>() && (newParent.model() == model()) ){
return true;
}
return false;
}