vxwlstlib.cpp

来自「vxworks源码源码解读是学习vxworks的最佳途径」· C++ 代码 · 共 60 行

CPP
60
字号
// vxwLstLib.cpp - simple linked list class// Copyright 1995-1999 Wind River Systems, Inc.#include "copyright_wrs.h"//// modification history// --------------------// 01b,23feb99,fle  doc : made it refgen compliant// 01a,15jun95,srh  written.//// IMPLEMENTS ../../../h/vxwLstLib.h VXWList#include "vxWorks.h"#include "vxwLstLib.h"VXWList::VXWList (const VXWList & aList)    {    lstInit (&list_);    NODE * pLastNode = aList.last ();    NODE * pNode = aList.first ();    while (pNode)	{	add (pNode);	if (pNode == pLastNode)	    break;	pNode = aList.next (pNode);	}    }VXWList &VXWList::operator = (const VXWList & aList)    {    if (this != &aList)	{    	lstFree (&list_);	lstInit (&list_);    	NODE * pLastNode = aList.last ();	NODE * pNode = aList.first ();	while (pNode)	    {	    add (pNode);	    if (pNode == pLastNode)		break;	    pNode = aList.next (pNode);	    }	}    return *this;    }char __vxwLstLib_o; // for forced linking in src/config/cplus*.c

⌨️ 快捷键说明

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