⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 attribute_notification_methods.htm

📁 acis说明文档
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
				<meta name="keywords" content="Attribute Notification Methods,Geometry,Warping,Body,Attributes,ACIS,Entity" />		<link rel="shortcut icon" href="/favicon.ico" />		<link rel="search" type="application/opensearchdescription+xml" href="/r18/opensearch_desc.php" title="DocR18 (English)" />		<link title="Creative Commons" type="application/rdf+xml" href="/r18/index.php?title=Attribute_Notification_Methods&amp;action=creativecommons" rel="meta" />		<title>Attribute Notification Methods - DocR18</title>
		<style type="text/css" media="screen, projection">/*<![CDATA[*/
			@import "/r18/skins/common/shared.css?97";
			@import "/r18/skins/monobook/main.css?97";
		/*]]>*/</style>
		<link rel="stylesheet" type="text/css" media="print" href="/r18/skins/common/commonPrint.css?97" />
		<!--[if lt IE 5.5000]><style type="text/css">@import "/r18/skins/monobook/IE50Fixes.css?97";</style><![endif]-->
		<!--[if IE 5.5000]><style type="text/css">@import "/r18/skins/monobook/IE55Fixes.css?97";</style><![endif]-->
		<!--[if IE 6]><style type="text/css">@import "/r18/skins/monobook/IE60Fixes.css?97";</style><![endif]-->
		<!--[if IE 7]><style type="text/css">@import "/r18/skins/monobook/IE70Fixes.css?97";</style><![endif]-->
		<!--[if lt IE 7]><script type="text/javascript" src="/r18/skins/common/IEFixes.js?97"></script>
		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
		
		<script type= "text/javascript">/*<![CDATA[*/var skin = "monobook";var stylepath = "/r18/skins";var wgArticlePath = "/r18/index.php/$1";var wgScriptPath = "/r18";var wgScript = "/r18/index.php";var wgServer = "http://doc.spatial.com";var wgCanonicalNamespace = "";var wgCanonicalSpecialPageName = false;var wgNamespaceNumber = 0;var wgPageName = "Attribute_Notification_Methods";var wgTitle = "Attribute Notification Methods";var wgAction = "view";var wgRestrictionEdit = ["sysop"];var wgRestrictionMove = ["sysop"];var wgArticleId = "440";var wgIsArticle = true;var wgUserName = null;var wgUserGroups = null;var wgUserLanguage = "en";var wgContentLanguage = "en";var wgBreakFrames = false;var wgCurRevisionId = "1108";/*]]>*/</script>                
		<script type="text/javascript" src="/r18/skins/common/wikibits.js?97"><!-- wikibits js --></script>
		<script type="text/javascript" src="/r18/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=monobook"><!-- site js --></script>
		<style type="text/css">/*<![CDATA[*/@import "/r18/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";@import "/r18/index.php?title=MediaWiki:Monobook.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";@import "/r18/index.php?title=-&action=raw&gen=css&maxage=18000";/*]]>*/</style>
		<!-- Head Scripts -->
		<script type="text/javascript" src="/r18/skins/common/ajax.js?97"></script><style type="text/css">/*<![CDATA[*/.source-cpp {line-height: normal;}.source-cpp li {line-height: normal;}/** * GeSHi Dynamically Generated Stylesheet * -------------------------------------- * Dynamically generated stylesheet for cpp * CSS class: source-cpp, CSS id:  * GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */.source-cpp .de1, .source-cpp .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}.source-cpp  {}.source-cpp .head {}.source-cpp .foot {}.source-cpp .imp {font-weight: bold; color: red;}.source-cpp .ln-xtra {color: #cc0; background-color: #ffc;}.source-cpp li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}.source-cpp li.li2 {font-weight: bold;}.source-cpp .kw1 {color: #0000ff;}.source-cpp .kw2 {color: #0000ff;}.source-cpp .kw3 {color: #0000dd;}.source-cpp .kw4 {color: #0000ff;}.source-cpp .kw5 {color: #000099;}.source-cpp .kw6 {color: #000099; font-weight:normal}.source-cpp .kw7 {color: #004D99;}.source-cpp .co1 {color: #006600; font-style: italic;}.source-cpp .co2 {color: #006600;}.source-cpp .coMULTI {color: #006600; font-style: italic;}.source-cpp .es0 {color: #666666; font-weight: bold;}.source-cpp .br0 {color: #B300D6;}.source-cpp .st0 {color: #999933;}.source-cpp .nu0 {color: #A30000;}.source-cpp .me1 {color: #993300;}.source-cpp .me2 {color: #993300;}@import "/r18/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";/*]]>*/</style>	</head>
<body  class="mediawiki ns-0 ltr page-Attribute_Notification_Methods">
	<div id="globalWrapper">
		<div id="column-content">
	<div id="content">
		<a name="top" id="top"></a>
				<h1 class="firstHeading">Attribute Notification Methods</h1>
		<div id="bodyContent">
			<h3 id="siteSub">From DocR18</h3>
			<div id="contentSub"></div>
									<div id="jump-to-nav">Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a></div>			<!-- start content -->
			<p>An important feature of an attribute is the ability to control its behavior when its owning <a href="/r18/index.php?title=Entity&amp;action=edit" class="new" title="Entity">entity</a> is modified during a modeling operation. <a href="/r18/index.php?title=Attributes&amp;action=edit" class="new" title="Attributes">Attributes</a> are <i>notified</i> of their owner being modified using an attribute <i>notification method</i>.</p><p>Notification methods are most typically called from within <a href="/r18/index.php?title=ACIS&amp;action=edit" class="new" title="ACIS">ACIS</a> geometric algorithms that are in the process of tearing down and rebuilding the model. As a result, take care in your implementation of each notification method not to assume too much about the validity of the model. You may safely assume that the attributes owner exists and that any input entity into the notification method exists, but you may not assume anything about the state of the model above or below the owner or the input entity(s).</p><p>Furthermore, a complex attribute that has pointers to topological and/or geometric entities in the model may not assume that those entities still exist. The ATTRIB class provides following notification methods:</p><table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div><ul><li class="toclevel-1"><a href="#copy_owner"><span class="tocnumber">1</span> <span class="toctext">copy_owner</span></a></li><li class="toclevel-1"><a href="#split_owner"><span class="tocnumber">2</span> <span class="toctext">split_owner</span></a></li><li class="toclevel-1"><a href="#merge_owner"><span class="tocnumber">3</span> <span class="toctext">merge_owner</span></a></li><li class="toclevel-1"><a href="#trans_owner"><span class="tocnumber">4</span> <span class="toctext">trans_owner</span></a></li><li class="toclevel-1"><a href="#to_tolerant_owner_and_from_tolerant_owner"><span class="tocnumber">5</span> <span class="toctext">to_tolerant_owner and from_tolerant_owner</span></a></li><li class="toclevel-1"><a href="#lop_change_owner"><span class="tocnumber">6</span> <span class="toctext">lop_change_owner</span></a></li><li class="toclevel-1"><a href="#replace_owner_geometry"><span class="tocnumber">7</span> <span class="toctext">replace_owner_geometry</span></a></li><li class="toclevel-1"><a href="#reverse_owner"><span class="tocnumber">8</span> <span class="toctext">reverse_owner</span></a></li><li class="toclevel-1"><a href="#warp_owner"><span class="tocnumber">9</span> <span class="toctext">warp_owner</span></a></li></ul></td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script><a name="copy_owner"></a><h2> <span class="mw-headline"> <code>copy_owner</code> </span></h2><pre class="source-cpp"><span class="kw2">virtual</span> <span class="kw4">void</span> copy_owner<span class="br0">&#40;</span> <span class="kw7">ENTITY</span> *copy_ent <span class="br0">&#41;</span>;</pre><p>The <code>copy_owner</code> method notifies "this" attribute that its owner has been copied. The copy of its owner is given as input, <i>copy_ent</i>.</p><p>Applications can specify how they want their attribute to behave in this method by either:</p><ul><li> Setting the copy_owner action in their attributes constructor.</li><li> Implementing this method directly.</li></ul><p>Use the ATTRIB::set_copy_owner_action method to set a copy_owner action. The types of copy_owner actions available are:</p><ul><li> <b>CopyLose</b> - Lose the attribute if its owner is copied.</li><li> <b>CopyKeep</b> - Do nothing if the owner is copied. <i>Default</i>.</li><li> <b>CopyCopy</b> - Create a new instance of the attribute on the new owner (using <code>ATTRIB::duplicate()</code>).</li></ul><p>In the event a complex attribute has its copy_owner action set to CopyCopy, ACIS creates a new instance of that complex attribute on the "copy_ent"; the caveat, however, is that all entity pointers (other than the owner_ptr) will be set to NULL.</p><p>If the copy_owner actions are not sufficient to meet your attributes specific needs, then the copy_owner method may be implemented directly.</p><p>A commonly asked question is "What is the difference between copy_owner and COPY_DEF?" api_copy_entity and api_copy_body copy all "copyable" <a href="/r18/index.php?title=Attributes&amp;action=edit" class="new" title="Attributes">attributes</a> using the standard COPY_DEF mechanism. api_down_copy_entity, in contrast, notifies each attribute using its copy_owner method. Why the distinction? Note that api_copy_entity is a full-<a href="/r18/index.php?title=Body&amp;action=edit" class="new" title="Body">body</a> copy. An attributes COPY_DEF implementation may trust that the full body is being copied. api_down_copy_entity, on the other hand, is a partial-body copy. As such, complex attributes cannot make any assumptions about the state of the entities to which they point. Therefore, <code>api_down_copy_entity</code> uses <code>copy_owner</code>.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -