📄 ref.implements.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>implements</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="The eCos Component Writer's Guide"HREF="cdl-guide.html"><LINKREL="UP"TITLE="CDL Language Specification"HREF="reference.html"><LINKREL="PREVIOUS"TITLE="if_define"HREF="ref.if-define.html"><LINKREL="NEXT"TITLE="include_dir"HREF="ref.include-dir.html"></HEAD><BODYCLASS="REFENTRY"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">The <SPANCLASS="APPLICATION">eCos</SPAN> Component Writer's Guide</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="ref.if-define.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="ref.include-dir.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="REF.IMPLEMENTS"><SPANCLASS="PROPERTY">implements</SPAN></H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN4507"></A><H2>Name</H2>Property <SPANCLASS="PROPERTY">implements</SPAN> -- Enabling this option provides one instance of a moregeneral interface.</DIV><DIVCLASS="REFSYNOPSISDIV"><ANAME="AEN4511"><H2>Synopsis</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SYNOPSIS">cdl_option <name> { implements <interface> …}</PRE></TD></TR></TABLE></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4513"></A><H2>Description</H2><P>The <SPANCLASS="APPLICATION">CDL</SPAN> interface concept provides an abstraction mechanism that canbe useful in many different circumstances. Essentially an interface isa calculated option whose value is the number of active and enabledoptions which implement that interface. For example the interface<TTCLASS="VARNAME">CYGINT_KERNEL_SCHEDULER</TT> has a value correspondingto the number of schedulers in the system, typically just one.</P><P>The <SPANCLASS="PROPERTY">implements</SPAN> property takes a single argument, which should be thename of an interface. This interface may be defined in the samepackage as the implementor or in some other package. In the lattercase it may sometimes be appropriate for the implementor or theimplementor's package to have a <SPANCLASS="PROPERTY">requires</SPAN> property for the packagecontaining the interface. An option may contain multiple <SPANCLASS="PROPERTY">implements</SPAN>properties. It is possible for an option to implement a giveninterface multiple times, and on occasion this is actually useful.</P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4522"></A><H2>Example</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">cdl_option CYGSEM_KERNEL_SCHED_MLQUEUE { display "Multi-level queue scheduler" default_value 1 implements CYGINT_KERNEL_SCHEDULER …}</PRE></TD></TR></TABLE></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4525"></A><H2>See Also</H2><P>Command <AHREF="ref.cdl-interface.html"><TTCLASS="LITERAL">cdl_interface</TT></A>.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="ref.if-define.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="cdl-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="ref.include-dir.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><SPANCLASS="PROPERTY">if_define</SPAN></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="reference.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><SPANCLASS="PROPERTY">include_dir</SPAN></TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -