📄 cpluslib.html
字号:
<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.html"><i>VxWorks Reference Manual : 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><i><a href="./cplusLib.html#cplusCallNewHandler">cplusCallNewHandler</a></i>( )</b> - call the allocation failure handler (C++)<br><b><i><a href="./cplusLib.html#cplusCtors">cplusCtors</a></i>( )</b> - call static constructors (C++)<br><b><i><a href="./cplusLib.html#cplusCtorsLink">cplusCtorsLink</a></i>( )</b> - call all linked static constructors (C++)<br><b><i><a href="./cplusLib.html#cplusDemanglerSet">cplusDemanglerSet</a></i>( )</b> - change C++ demangling mode (C++)<br><b><i><a href="./cplusLib.html#cplusDtors">cplusDtors</a></i>( )</b> - call static destructors (C++)<br><b><i><a href="./cplusLib.html#cplusDtorsLink">cplusDtorsLink</a></i>( )</b> - call all linked static destructors (C++)<br><b><i><a href="./cplusLib.html#cplusLibInit">cplusLibInit</a></i>( )</b> - initialize the C++ library (C++)<br><b><i><a href="./cplusLib.html#cplusXtorSet">cplusXtorSet</a></i>( )</b> - change C++ static constructor calling strategy (C++)<br><b><i><a href="./cplusLib.html#operator delete">operator delete</a></i>( )</b> - default run-time support for memory deallocation (C++)<br><b><i><a href="./cplusLib.html#operator new">operator new</a></i>( )</b> - default run-time support for operator new (C++)<br><b><i><a href="./cplusLib.html#operator new_1">operator new</a></i>( )</b> - default run-time support for operator new (nothrow) (C++)<br><b><i><a href="./cplusLib.html#operator new_2">operator new</a></i>( )</b> - run-time support for operator new with placement (C++)<br><b><i><a href="./cplusLib.html#set_new_handler">set_new_handler</a></i>( )</b> - set new_handler to user-defined function (C++)<br><b><i><a href="./cplusLib.html#set_terminate">set_terminate</a></i>( )</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:<ul><li>Support for C++ new and delete operators.</li><li>Support for initialization and cleanup of static objects. </ul><p>Shell utilities are provided for:<ul><li>Resolving overloaded C++ function names.</li><li>Hiding C++ name mangling, with support for terse or completename demangling.</li><li>Manual or automatic invocation of static constructors and destructors. </ul><p><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><b><a href="./cplusLib.html#top">cplusLib</a></b>, <i>VxWorks Programmer's Guide: C++ Development</i><hr><a name="cplusCallNewHandler"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>cplusCallNewHandler</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>cplusCallNewHandler</i>( )</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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>cplusCtors</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>cplusCtors</i>( )</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><i><a href="./cplusLib.html#cplusXtorSet">cplusXtorSet</a></i>( )</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> -> cplusCtors "applx.out" value = 0 = 0x0 -> 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><i><a href="./cplusLib.html#cplusCtors">cplusCtors</a></i>( )</b>:<p><pre> -> cplusCtors value = 0 = 0x0</pre></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><i><a href="./cplusLib.html#cplusXtorSet">cplusXtorSet</a></i>( )</b><hr><a name="cplusCtorsLink"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>cplusCtorsLink</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>cplusCtorsLink</i>( )</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><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>( )</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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>cplusDemanglerSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>cplusDemanglerSet</i>( )</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> _member__5classFPFl_PvPFPv_v</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="cplusDtors"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>cplusDtors</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>cplusDtors</i>( )</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><i><a href="./cplusLib.html#cplusXtorSet">cplusXtorSet</a></i>( )</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> -> cplusDtors "applx.out" value = 0 = 0x0 -> 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><i><a href="./cplusLib.html#cplusDtors">cplusDtors</a></i>( )</b>:<p><pre> -> cplusDtors value = 0 = 0x0</pre></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><i><a href="./cplusLib.html#cplusXtorSet">cplusXtorSet</a></i>( )</b><hr><a name="cplusDtorsLink"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>cplusDtorsLink</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>cplusDtorsLink</i>( )</strong> - call all linked static destructors (C++)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>extern "C" void cplusDtorsLink ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -