📄 property.cxx
字号:
CdlConflict_UnresolvedBody::make(transact, source, this, get_destination_name()); } else { bind(source, this, dest); } break; } case CdlUpdate_Unloading: { // The source is being unloaded. If the reference is currently bound, // unbind it. There is no point in creating a new conflict object. CYG_ASSERTC(0 == dest); dest = get_destination(); if (0 != dest) { unbind(source, this); } break; } case CdlUpdate_Created: { // There is an existing conflict object, but the destination has // just been created. The old conflict object should be eliminated, // and the reference can now be bound. CYG_ASSERT_CLASSC(dest); bind(source, this, dest); CdlConflict conflict = transact->get_structural_conflict(source, this, &CdlConflict_UnresolvedBody::test); CYG_ASSERTC(0 != conflict); transact->clear_conflict(conflict); break; } case CdlUpdate_Destroyed : { // The destination is about to be destroyed. Eliminate the existing // binding and create a new conflict object. CYG_ASSERT_CLASSC(dest); unbind(source, this); CdlConflict_UnresolvedBody::make(transact, source, this, get_destination_name()); break; } // Init, ValueChange and ActiveChange are of no interest. default: break; } (*update_handler)(transact, source, this, dest, change); CYG_REPORT_RETURN();}// ----------------------------------------------------------------------------boolCdlProperty_ReferenceBody::check_this(cyg_assert_class_zeal zeal) const{ if (CdlProperty_ReferenceBody_Magic != cdlproperty_referencebody_cookie) { return false; } CYGDBG_MEMLEAK_CHECKTHIS(); return inherited_property::check_this(zeal) && inherited_reference::check_this(zeal);}//}}}//{{{ CdlProperty_Expression class // ----------------------------------------------------------------------------// This is pretty simple since most of the functionality is provided by the// base expression class.CdlProperty_ExpressionCdlProperty_ExpressionBody::make(CdlNode node_arg, std::string name_arg, CdlExpression expr_arg, CdlUpdateHandler update_handler_arg, int argc_arg, char** argv_arg, std::vector<std::pair<std::string,std::string> >& options_arg){ return new CdlProperty_ExpressionBody(node_arg, name_arg, expr_arg, update_handler_arg, argc_arg, argv_arg, options_arg);}CdlProperty_ExpressionBody::CdlProperty_ExpressionBody(CdlNode node_arg, std::string name_arg, CdlExpression expr_arg, CdlUpdateHandler update_handler_arg, int argc_arg, char** argv_arg, std::vector<std::pair<std::string,std::string> >& options_arg) : CdlPropertyBody(node_arg, name_arg, argc_arg, argv_arg, options_arg), CdlExpressionBody(*expr_arg), update_handler(update_handler_arg){ CYG_REPORT_FUNCNAME("CdlProperty_Expression:: constructor"); CYG_REPORT_FUNCARG1("this %p", this); cdlproperty_expressionbody_cookie = CdlProperty_ExpressionBody_Magic; CYGDBG_MEMLEAK_CONSTRUCTOR(); CYG_POSTCONDITION_THISC(); CYG_REPORT_RETURN();}CdlProperty_ExpressionBody::~CdlProperty_ExpressionBody(){ CYG_REPORT_FUNCNAME("CdlProperty_Expression:: destructor"); CYG_REPORT_FUNCARG1("this %p", this); CYG_PRECONDITION_THISC(); cdlproperty_expressionbody_cookie = CdlProperty_ExpressionBody_Invalid; CYGDBG_MEMLEAK_DESTRUCTOR(); CYG_REPORT_RETURN();}voidCdlProperty_ExpressionBody::update(CdlTransaction transact, CdlNode source, CdlNode dest, CdlUpdate change){ CYG_REPORT_FUNCNAME("CdlProperty_Expression::update"); CYG_REPORT_FUNCARG5XV(this, transact, source, dest, change); CYG_PRECONDITION_THISC(); // The CdlExpression update() member will take care of binding // and unbinding, as needed. if ((change & (CdlUpdate_Loaded | CdlUpdate_Unloading | CdlUpdate_Created | CdlUpdate_Destroyed)) != 0) { (void) CdlExpressionBody::update(transact, source, this, dest, change); } // Now invoke the per-property update handler to re-evaluate the // expression etc., as needed (*update_handler)(transact, source, this, dest, change); CYG_REPORT_RETURN();}boolCdlProperty_ExpressionBody::check_this(cyg_assert_class_zeal zeal) const{ if (CdlProperty_ExpressionBody_Magic != cdlproperty_expressionbody_cookie) { return false; } CYGDBG_MEMLEAK_CHECKTHIS(); return inherited_property::check_this(zeal) && inherited_expression::check_this(zeal);}//}}}//{{{ CdlProperty_ListExpression class // ----------------------------------------------------------------------------// This is pretty simple since most of the functionality is provided by the// base expression class.CdlProperty_ListExpressionCdlProperty_ListExpressionBody::make(CdlNode node_arg, std::string name_arg, CdlListExpression expr_arg, CdlUpdateHandler update_handler_arg, int argc_arg, char** argv_arg, std::vector<std::pair<std::string,std::string> >& options_arg){ return new CdlProperty_ListExpressionBody(node_arg, name_arg, expr_arg, update_handler_arg, argc_arg, argv_arg, options_arg);}CdlProperty_ListExpressionBody::CdlProperty_ListExpressionBody(CdlNode node_arg, std::string name_arg, CdlListExpression expr_arg, CdlUpdateHandler update_handler_arg, int argc_arg, char** argv_arg, std::vector<std::pair<std::string,std::string> >& options_arg) : CdlPropertyBody(node_arg, name_arg, argc_arg, argv_arg, options_arg), CdlListExpressionBody(*expr_arg), update_handler(update_handler_arg){ CYG_REPORT_FUNCNAME("CdlProperty_ListExpression:: constructor"); CYG_REPORT_FUNCARG1("this %p", this); cdlproperty_listexpressionbody_cookie = CdlProperty_ListExpressionBody_Magic; CYGDBG_MEMLEAK_CONSTRUCTOR(); CYG_POSTCONDITION_THISC(); CYG_REPORT_RETURN();}CdlProperty_ListExpressionBody::~CdlProperty_ListExpressionBody(){ CYG_REPORT_FUNCNAME("CdlProperty_ListExpression:: destructor"); CYG_REPORT_FUNCARG1("this %p", this); CYG_PRECONDITION_THISC(); cdlproperty_listexpressionbody_cookie = CdlProperty_ListExpressionBody_Invalid; CYGDBG_MEMLEAK_DESTRUCTOR(); CYG_REPORT_RETURN();}voidCdlProperty_ListExpressionBody::update(CdlTransaction transact, CdlNode source, CdlNode dest, CdlUpdate change){ CYG_REPORT_FUNCNAME("CdlProperty_ListExpression::update"); CYG_REPORT_FUNCARG4XV(this, source, dest, change); CYG_PRECONDITION_THISC(); if ((change & (CdlUpdate_Loaded | CdlUpdate_Unloading | CdlUpdate_Created | CdlUpdate_Destroyed)) != 0) { bool handled = CdlListExpressionBody::update(transact, source, this, dest, change); CYG_UNUSED_PARAM(bool, handled); CYG_ASSERTC(handled); } // Now invoke the per-property update handler to re-evaluate // the lexpr as appropriate. (*update_handler)(transact, source, this, dest, change); CYG_REPORT_RETURN();}boolCdlProperty_ListExpressionBody::check_this(cyg_assert_class_zeal zeal) const{ if (CdlProperty_ListExpressionBody_Magic != cdlproperty_listexpressionbody_cookie) { return false; } CYGDBG_MEMLEAK_CHECKTHIS(); return inherited_property::check_this(zeal) && inherited_expression::check_this(zeal);}//}}}//{{{ CdlProperty_GoalExpression class // ----------------------------------------------------------------------------// This is pretty simple since most of the functionality is provided by the// base expression class.CdlProperty_GoalExpressionCdlProperty_GoalExpressionBody::make(CdlNode node_arg, std::string name_arg, CdlGoalExpression expr_arg, CdlUpdateHandler update_handler_arg, int argc_arg, char** argv_arg, std::vector<std::pair<std::string,std::string> >& options_arg){ return new CdlProperty_GoalExpressionBody(node_arg, name_arg, expr_arg, update_handler_arg, argc_arg, argv_arg, options_arg);}CdlProperty_GoalExpressionBody::CdlProperty_GoalExpressionBody(CdlNode node_arg, std::string name_arg, CdlGoalExpression expr_arg, CdlUpdateHandler update_handler_arg, int argc_arg, char** argv_arg, std::vector<std::pair<std::string,std::string> >& options_arg) : CdlPropertyBody(node_arg, name_arg, argc_arg, argv_arg, options_arg), CdlGoalExpressionBody(*expr_arg), update_handler(update_handler_arg){ CYG_REPORT_FUNCNAME("CdlProperty_GoalExpression:: constructor"); CYG_REPORT_FUNCARG1("this %p", this); cdlproperty_goalexpressionbody_cookie = CdlProperty_GoalExpressionBody_Magic; CYGDBG_MEMLEAK_CONSTRUCTOR(); CYG_POSTCONDITION_THISC(); CYG_REPORT_RETURN();}CdlProperty_GoalExpressionBody::~CdlProperty_GoalExpressionBody(){ CYG_REPORT_FUNCNAME("CdlProperty_GoalExpression:: destructor"); CYG_REPORT_FUNCARG1("this %p", this); CYG_PRECONDITION_THISC(); cdlproperty_goalexpressionbody_cookie = CdlProperty_GoalExpressionBody_Invalid; CYGDBG_MEMLEAK_DESTRUCTOR(); CYG_REPORT_RETURN();}voidCdlProperty_GoalExpressionBody::update(CdlTransaction transact, CdlNode source, CdlNode dest, CdlUpdate change){ CYG_REPORT_FUNCNAME("CdlProperty_GoalExpression::update"); CYG_REPORT_FUNCARG4XV(this, source, dest, change); CYG_PRECONDITION_THISC(); // The CdlExpression update() member will take care of binding and // unbinding, as needed. if ((change & (CdlUpdate_Loaded | CdlUpdate_Unloading | CdlUpdate_Created | CdlUpdate_Destroyed)) != 0) { CdlExpression expr = get_expression(); bool handled = expr->update(transact, source, this, dest, change); CYG_UNUSED_PARAM(bool, handled); CYG_ASSERTC(handled); } // Now invoke the per-property update handler to re-evaluate // the gexpr as appropriate (*update_handler)(transact, source, this, dest, change); CYG_REPORT_RETURN();}boolCdlProperty_GoalExpressionBody::check_this(cyg_assert_class_zeal zeal) const{ if (CdlProperty_GoalExpressionBody_Magic != cdlproperty_goalexpressionbody_cookie) { return false; } CYGDBG_MEMLEAK_CHECKTHIS(); return inherited_property::check_this(zeal) && inherited_expression::check_this(zeal);}//}}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -