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

📄 cpluslib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/cplusLib.html - generated by refgen from cplusLibDoc.c --> <title> cplusLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference :  OS Libraries</i></a></p></blockquote><h1>cplusLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>cplusLib</strong> - basic run-time support for C++ </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./cplusLib.html#cplusCallNewHandler">cplusCallNewHandler</a>(&nbsp;)</b>  -  call the allocation failure handler (C++)<br><b><a href="./cplusLib.html#cplusCtors">cplusCtors</a>(&nbsp;)</b>  -  call static constructors (C++)<br><b><a href="./cplusLib.html#cplusCtorsLink">cplusCtorsLink</a>(&nbsp;)</b>  -  call all linked static constructors (C++)<br><b><a href="./cplusLib.html#cplusDemanglerSet">cplusDemanglerSet</a>(&nbsp;)</b>  -  change C++ demangling mode (C++)<br><b><a href="./cplusLib.html#cplusDemanglerStyleSet">cplusDemanglerStyleSet</a>(&nbsp;)</b>  -  change C++ demangling style (C++)<br><b><a href="./cplusLib.html#cplusDtors">cplusDtors</a>(&nbsp;)</b>  -  call static destructors (C++)<br><b><a href="./cplusLib.html#cplusDtorsLink">cplusDtorsLink</a>(&nbsp;)</b>  -  call all linked static destructors (C++)<br><b><a href="./cplusLib.html#cplusLibInit">cplusLibInit</a>(&nbsp;)</b>  -  initialize the C++ library (C++)<br><b><a href="./cplusLib.html#cplusXtorSet">cplusXtorSet</a>(&nbsp;)</b>  -  change C++ static constructor calling strategy (C++)<br><b><a href="./cplusLib.html#operator delete">operator delete</a>(&nbsp;)</b>  -  default run-time support for memory deallocation (C++)<br><b><a href="./cplusLib.html#operator new">operator new</a>(&nbsp;)</b>  -  default run-time support for operator new (C++)<br><b><a href="./cplusLib.html#operator new_1">operator new</a>(&nbsp;)</b>  -  default run-time support for operator new (nothrow) (C++)<br><b><a href="./cplusLib.html#operator new_2">operator new</a>(&nbsp;)</b>  -  run-time support for operator new with placement (C++)<br><b><a href="./cplusLib.html#set_new_handler">set_new_handler</a>(&nbsp;)</b>  -  set <b>new_handler</b> to user-defined function (C++)<br><b><a href="./cplusLib.html#set_terminate">set_terminate</a>(&nbsp;)</b>  -  set terminate to user-defined function (C++)<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides run-time support and shell utilities that supportthe development of VxWorks applications in C++.  The run-time support canbe broken into three categories:<table></tr><tr valign=top><td>-<td>Support for C++ new and delete operators.</tr><tr valign=top><td>-<td>Support for initialization and cleanup of static objects.</table>Shell utilities are provided for:<table></tr><tr valign=top><td>-<td>Resolving overloaded C++ function names.</tr><tr valign=top><td>-<td>Hiding C++ name mangling, with support for terse or completename demangling.</tr><tr valign=top><td>-<td>Manual or automatic invocation of static constructors and destructors.</table><p>The usage of <b><a href="./cplusLib.html#top">cplusLib</a></b> is more fully described in the<i>VxWorks Programmer's Guide: C++ Development. </i></blockquote><h4>SEE ALSO</h4><blockquote><p><i>VxWorks Programmer's Guide: C++ Development </i><p><hr><a name="cplusCallNewHandler"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>cplusCallNewHandler(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>cplusCallNewHandler(&nbsp;)</strong> - call the allocation failure handler (C++)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>extern void cplusCallNewHandler ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function provides a procedural-interface to the new-handler.  Itcan be used by user-defined new operators to call the currentnew-handler.  This function is specific to VxWorks and may not beavailable in other C++ environments.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cplusLib.html#top">cplusLib</a></b><hr><a name="cplusCtors"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>cplusCtors(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>cplusCtors(&nbsp;)</strong> - call static constructors (C++)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>extern "C" void cplusCtors    (    const char * moduleName   /* name of loaded module */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function is used to call static constructors under the manualstrategy (see <b><a href="./cplusLib.html#cplusXtorSet">cplusXtorSet</a>(&nbsp;)</b>).  <i>moduleName</i> is the name of anobject module that was "munched" before loading.  If <i>moduleName</i> is 0,then all static constructors, in all modules loaded by the VxWorksmodule loader, are called.<p></blockquote><h4>EXAMPLES</h4><blockquote><p>The following example shows how to initialize the static objects inmodules called "applx.out" and "apply.out".<p><pre>    -&gt; cplusCtors "applx.out"    value = 0 = 0x0    -&gt; cplusCtors "apply.out"    value = 0 = 0x0</pre>The following example shows how to initialize all the static objects that arecurrently loaded, with a single invocation of <b><a href="./cplusLib.html#cplusCtors">cplusCtors</a>(&nbsp;)</b>:<p><pre>    -&gt; cplusCtors    value = 0 = 0x0</pre></blockquote><h4>WARNING</h4><blockquote><p><b><a href="./cplusLib.html#cplusCtors">cplusCtors</a>(&nbsp;)</b> should only be called once per module otherwise unpredictablebehavior may result.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cplusLib.html#top">cplusLib</a></b>, <b><a href="./cplusLib.html#cplusXtorSet">cplusXtorSet</a>(&nbsp;)</b><hr><a name="cplusCtorsLink"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>cplusCtorsLink(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>cplusCtorsLink(&nbsp;)</strong> - call all linked static constructors (C++)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>extern "C" void cplusCtorsLink ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function calls constructors for all of the static objects linkedwith a VxWorks bootable image.  When creating bootable applications,this function should be called from <b><a href="./usrConfig.html#usrRoot">usrRoot</a>(&nbsp;)</b> to initialize all staticobjects.  Correct operation depends on correctly munching the C++modules that are linked with VxWorks.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cplusLib.html#top">cplusLib</a></b><hr><a name="cplusDemanglerSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>cplusDemanglerSet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>cplusDemanglerSet(&nbsp;)</strong> - change C++ demangling mode (C++)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>extern "C" void cplusDemanglerSet    (    int mode    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command sets the C++ demangling mode to <i>mode</i>.The default mode is 2.<p>There are three demangling modes, <i>complete</i>, <i>terse</i>, and <i>off</i>.These modes are represented by numeric codes:<p><table><tr valign=top><th align=left>Mode     </th><th align=left> Code</tr><tr><td colspan="2"><hr></tr><tr valign=top><td align=left>off      </td><td align=left> 0</tr><tr valign=top><td align=left>terse    </td><td align=left> 1</tr><tr valign=top><td align=left>complete </td><td align=left> 2</tr><tr valign=top><td align=left></tr></tr></table>In complete mode, when C++ function names are printed, the classname (if any) is prefixed and the function's parameter type listis appended.<p>In terse mode, only the function name is printed. The class nameand parameter type list are omitted.<p>In off mode, the function name is not demangled.</blockquote><h4>EXAMPLES</h4><blockquote><p>The following example shows how one function name would be printedunder each demangling mode:<p><table><tr valign=top><th align=left>Mode     </th><th align=left> Printed symbol</tr><tr><td colspan="2"><hr></tr><tr valign=top><td align=left>off      </td><td align=left> <b>_member__5classFPFl_PvPFPv_v</b></tr><tr valign=top><td align=left>terse    </td><td align=left> _member</tr><tr valign=top><td align=left>complete </td><td align=left> foo::_member(void* (*)(long),void (*)(void*))</tr><tr valign=top><td align=left></tr></tr></table></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cplusLib.html#top">cplusLib</a></b><hr><a name="cplusDemanglerStyleSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>cplusDemanglerStyleSet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>cplusDemanglerStyleSet(&nbsp;)</strong> - change C++ demangling style (C++)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>extern "C" void cplusDemanglerStyleSet    (    DEMANGLER_STYLE style    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command sets the C++ demangling mode to <i>style</i>.The available demangler styles are enumerated in <b>demangler.h</b>.The default demangling style depends on the toolchain used to build the kernel. For example if the Diab toolchain is used to build the kernel then the default demangler style is <b>DMGL_STYLE_DIAB</b>. <p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cplusLib.html#top">cplusLib</a></b><hr><a name="cplusDtors"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>cplusDtors(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>cplusDtors(&nbsp;)</strong> - call static destructors (C++)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>extern "C" void cplusDtors    (    const char * moduleName    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function is used to call static destructors under the manualstrategy (see <b><a href="./cplusLib.html#cplusXtorSet">cplusXtorSet</a>(&nbsp;)</b>).  <i>moduleName</i> is the name of anobject module that was "munched" before loading.  If <i>moduleName</i> is 0,then all static destructors, in all modules loaded by the VxWorksmodule loader, are called.<p></blockquote><h4>EXAMPLES</h4><blockquote><p>The following example shows how to destroy the static objects inmodules called "applx.out" and "apply.out":<p><pre>    -&gt; cplusDtors "applx.out"    value = 0 = 0x0    -&gt; cplusDtors "apply.out"    value = 0 = 0x0</pre>The following example shows how to destroy all the static objects that arecurrently loaded, with a single invocation of <b><a href="./cplusLib.html#cplusDtors">cplusDtors</a>(&nbsp;)</b>:<p><pre>    -&gt; cplusDtors    value = 0 = 0x0</pre></blockquote><h4>WARNING</h4><blockquote><p><b><a href="./cplusLib.html#cplusDtors">cplusDtors</a>(&nbsp;)</b> should only be called once per module otherwise unpredictablebehavior may result.

⌨️ 快捷键说明

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