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

📄 create_an_organization_attribute_class.htm

📁 acis说明文档
💻 HTM
📖 第 1 页 / 共 2 页
字号:
</p><ol><li> Copy the at_tsl.cxx file from the ACIS installation directory and rename it at_abc.cxx. (If you do not have the source file, enter the content from this example into a file.)</li><li> Change the bold sentinels as was done for the at_abc.hxx header file.</li><li> Enter statements to include the header files necessary to define the attribute.</li></ol><blockquote class="templatequote"><div><p><i><b>Note:</b>  File acis.hxx should always be the first header file included in every ACIS application implementation file.</i></p></div></blockquote><p>The following example of the attribute implementation file shows the sentinels that are to be replaced in <b>bold</b> font. In the new file, the new sentinel is shown in<i> <b>bold italic</b></i> font.</p><a name="C.2B.2B_Example_3"></a><h3> <span class="mw-headline"> C++ Example </span></h3><pre class="source-cpp"><span class="kw2">#include</span> &lt;stdio.<span class="me1">h</span>&gt;<span class="kw2">#include</span> <span class="st0">&quot;acis.hxx&quot;</span><span class="kw2">#include</span> <span class="st0">&quot;dcl_kern.h&quot;</span><span class="kw2">#include</span> <span class="st0">&quot;at_tsl.hxx&quot;</span><span class="kw2">#include</span> <span class="st0">&quot;datamsc.hxx&quot;</span><span class="co1">// Define macros for this attribute and its parent, to provide</span><span class="co1">// the information to the definition macro.</span><span class="kw2">#define</span> <span class="kw3">THIS</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw7">ATTRIB_TSL</span><span class="kw2">#define</span> <span class="kw7">THIS_LIB</span> KERN<span class="kw2">#define</span> <span class="kw7">PARENT</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw7">ATTRIB</span><span class="kw2">#define</span> <span class="kw7">PARENT_LIB</span> KERN<span class="co1">// Identifier used externally to identify a particular entity</span><span class="co1">// type. This is only used within the save/restore system for</span><span class="co1">// translating to/from external file format, but must be unique</span><span class="co1">// amongst attributes derived directly from ATTRIB, across all</span><span class="co1">// application developers.</span><span class="kw2">#define</span> <span class="kw7">ATTRIB_TSL_NAME</span> <span class="st0">&quot;tsl&quot;</span><span class="kw7">MASTER_ATTRIB_DEFN</span><span class="br0">&#40;</span> <span class="st0">&quot;tsl master attribute&quot;</span> <span class="br0">&#41;</span></pre><p>Example. Original at_tsl.cxx</p><p>The macro MASTER_ATTRIB_DEFN generates all the code necessary to define the organization attribute class. The character string is the value returned by the type_name method. After customizing .at_tsl.cxx into .at_abc.cxx, the organization class file should appear similar to the next example.</p><a name="C.2B.2B_Example_4"></a><h3> <span class="mw-headline"> C++ Example </span></h3><pre class="source-cpp"><span class="kw2">#include</span> &lt;stdio.<span class="me1">h</span>&gt;<span class="kw2">#include</span> <span class="st0">&quot;acis.hxx&quot;</span><span class="kw2">#include</span> <span class="st0">&quot;dcl_kern.h&quot;</span><span class="kw2">#include</span> <span class="st0">&quot;datamsc.hxx&quot;</span><span class="kw2">#include</span> <span class="st0">&quot;at_abc.hxx&quot;</span>&nbsp;<span class="co1">// Define macros for this attribute and its parent, to provide</span><span class="co1">// the information to the definition macro.</span>&nbsp;<span class="kw2">#define</span> <span class="kw3">THIS</span><span class="br0">&#40;</span><span class="br0">&#41;</span> ATTRIB_ABC<span class="kw2">#define</span> <span class="kw7">THIS_LIB</span> NONE<span class="kw2">#define</span> <span class="kw7">PARENT</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw7">ATTRIB</span><span class="kw2">#define</span> <span class="kw7">PARENT_LIB</span> KERN&nbsp;<span class="co1">// Identifier used externally to identify a particular entity</span><span class="co1">// type. This is only used within the save/restore system for</span><span class="co1">// translating to/from external file format, but must be unique</span><span class="co1">// amongst attributes derived directly from ATTRIB, across all</span><span class="co1">// application developers.</span>&nbsp;<span class="kw2">#define</span> ATTRIB_ABC_NAME abc<span class="kw7">MASTER_ATTRIB_DEFN</span><span class="br0">&#40;</span> abc master attribute <span class="br0">&#41;</span></pre><p>Example. Customized at_abc.cxx</p><!-- Tidy found serious XHTML errors --><!-- Saved in parser cache with key r18_docdb-r18doc_:pcache:idhash:434-0!1!0!!en!2!edit=0 and timestamp 20080624032957 --><div class="printfooter">Retrieved from "<a href="http://doc.spatial.com/r18/index.php/HowTo:ACIS:Create_an_Organization_Attribute_Class">http://doc.spatial.com/r18/index.php/HowTo:ACIS:Create_an_Organization_Attribute_Class</a>"</div>			<div id="catlinks"><p class='catlinks'><a href="/r18/index.php/Special:Categories" title="Special:Categories">Categories</a>: <span dir='ltr'><a href="/r18/index.php/Category:ACIS_Docs" title="Category:ACIS Docs">ACIS Docs</a></span> | <span dir='ltr'><a href="/r18/index.php/Category:ACIS_Getting_Started" title="Category:ACIS Getting Started">ACIS Getting Started</a></span></p></div>			<!-- end content -->
			<div class="visualClear"></div>
		</div>
	</div>
		</div>
		<div id="column-one">
	<div id="p-cactions" class="portlet">
		<h5>Views</h5>
		<div class="pBody">
			<ul>
					 <li id="ca-nstab-howto" class="selected"><a href="/r18/index.php/HowTo:ACIS:Create_an_Organization_Attribute_Class">HowTo</a></li>
					 <li id="ca-talk" class="new"><a href="/r18/index.php?title=HowTo_talk:ACIS:Create_an_Organization_Attribute_Class&amp;action=edit" title="Discussion about the content page [t]" accesskey="t">Discussion</a></li>
					 <li id="ca-viewsource"><a href="/r18/index.php?title=HowTo:ACIS:Create_an_Organization_Attribute_Class&amp;action=edit" title="This page is protected. You can view its source. [e]" accesskey="e">View source</a></li>
					 <li id="ca-history"><a href="/r18/index.php?title=HowTo:ACIS:Create_an_Organization_Attribute_Class&amp;action=history" title="Past versions of this page. [h]" accesskey="h">History</a></li>
				</ul>
		</div>
	</div>
	<div class="portlet" id="p-personal">
		<h5>Personal tools</h5>
		<div class="pBody">
			<ul>
				<li id="pt-login"><a href="/r18/index.php?title=Special:Userlogin&amp;returnto=HowTo:ACIS:Create_an_Organization_Attribute_Class" title="You are encouraged to log in, it is not mandatory however. [o]" accesskey="o">Log in / create account</a></li>
			</ul>
		</div>
	</div>
	<div class="portlet" id="p-logo">
		<a style="background-image: url(/r18/images/SpatialCorpLogo.gif);" href="/r18/index.php/Main_Page" title="Visit the Main Page [z]" accesskey="z"></a>
	</div>
	<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
		<div class='portlet' id='p-navigation'>
		<h5>Navigation</h5>
		<div class='pBody'>
			<ul>
				<li id="n--Home"><a href="http://doc.spatial.com/ "> Home</a></li>
				<li id="n-mainpage"><a href="/r18/index.php/Main_Page" title="Visit the Main Page [z]" accesskey="z">Main Page</a></li>
				<li id="n-recentchanges"><a href="/r18/index.php/Special:Recentchanges" title="The list of recent changes in the wiki. [r]" accesskey="r">Recent changes</a></li>
				<li id="n-randompage"><a href="/r18/index.php/Special:Random" title="Load a random page [x]" accesskey="x">Random page</a></li>
				<li id="n-help"><a href="/r18/index.php/Help:Contents" title="The place to find out.">Help</a></li>
			</ul>
		</div>
	</div>
		<div class='portlet' id='p-spatial_sites'>
		<h5>spatial sites</h5>
		<div class='pBody'>
			<ul>
				<li id="n--Spatial.com"><a href="http://www.spatial.com "> Spatial.com</a></li>
				<li id="n---Online-Support-Center"><a href="http://spatial.custhelp.com/cgi-bin/spatial.cfg/php/enduser/acct_login.php?p_sid=tblNMDHh&amp;p_lva=&amp;p_sp=&amp;p_li=&amp;p_next_page=std_alp.php">  Online Support Center</a></li>
				<li id="n--Community-Forum"><a href="http://forums.spatial.com/ "> Community Forum</a></li>
				<li id="n--Downloads"><a href="http://www.spatial.com/products/download.html "> Downloads</a></li>
				<li id="n--Feedback"><a href="mailto:docfeedback_spatial@3ds.com "> Feedback</a></li>
			</ul>
		</div>
	</div>
		<div class='portlet' id='p-products'>
		<h5>products</h5>
		<div class='pBody'>
			<ul>
				<li id="n-ACIS-Tutorials---Beta"><a href="/r18/index.php/Tutorial:ACIS_Tutorials">ACIS Tutorials - Beta</a></li>
				<li id="n-InterOp"><a href="/r18/index.php/Portal:InterOp">InterOp</a></li>
			</ul>
		</div>
	</div>
		<div id="p-search" class="portlet">
		<h5><label for="searchInput">Search</label></h5>
		<div id="searchBody" class="pBody">
			<form action="/r18/index.php/Special:Search" id="searchform"><div>
				<input id="searchInput" name="search" type="text" title="Search DocR18 [f]" accesskey="f" value="" />
				<input type='submit' name="go" class="searchButton" id="searchGoButton"	value="Go" />&nbsp;
				<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="Search" />
			</div></form>
		</div>
	</div>
	<div class="portlet" id="p-tb">
		<h5>Toolbox</h5>
		<div class="pBody">
			<ul>
				<li id="t-whatlinkshere"><a href="/r18/index.php/Special:Whatlinkshere/HowTo:ACIS:Create_an_Organization_Attribute_Class" title="List of all wiki pages that link here [j]" accesskey="j">What links here</a></li>
				<li id="t-recentchangeslinked"><a href="/r18/index.php/Special:Recentchangeslinked/HowTo:ACIS:Create_an_Organization_Attribute_Class" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li>
<li id="t-specialpages"><a href="/r18/index.php/Special:Specialpages" title="List of all special pages [q]" accesskey="q">Special pages</a></li>
				<li id="t-print"><a href="/r18/index.php?title=HowTo:ACIS:Create_an_Organization_Attribute_Class&amp;printable=yes" title="Printable version of this page [p]" accesskey="p">Printable version</a></li>				<li id="t-permalink"><a href="/r18/index.php?title=HowTo:ACIS:Create_an_Organization_Attribute_Class&amp;oldid=1201" title="Permanent link to this version of the page">Permanent link</a></li>			</ul>
		</div>
	</div>
		</div><!-- end of the left (by default at least) column -->
			<div class="visualClear"></div>
			<div id="footer">
				<div id="f-poweredbyico"><a href="http://www.mediawiki.org/"><img src="/r18/skins/common/images/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" /></a></div>
        <ul> 
            <li>&copy 1999-2008 Spatial Corp.</li>
            <li> Please send feedback to <a href="mailto:docfeedback_spatial@3ds.com">docfeedback_spatial@3ds.com</a> or just <a href="../index.php?title=Special:Userlogin&returnto=Special:Userlogout">login</a> and start editing the comments page.</li>
        </ul>

        <ul id="f-list">
				<li id="lastmod"> This page was last modified 16:23, 23 May 2008.</li>

				<li id="viewcount">This page has been accessed 16 times.</li>

                <li> <a href="../index.php/Project:Terms_of_Use">Terms of Use</a> </li>
                <li> <a href="../index.php/Project:Privacy_policy">Privacy Policy</a> </li>
			</ul>
		</div>
		
			<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script> <script type='text/javascript' src='/r18/javascript_form/getXterlinks.js'></script> <script type='text/javascript'>getXterlinks()</script></div>
<!-- Served in 1.072 secs. --></body></html>

⌨️ 快捷键说明

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