📄 oaverilogparamlist.cpp
字号:
// *****************************************************************************// *****************************************************************************// oaVerilogParamList.cpp//// This file contains the implementation for the ParamList class.//// *****************************************************************************// Except as specified in the OpenAccess terms of use of Cadence or Silicon// Integration Initiative, this material may not be copied, modified,// re-published, uploaded, executed, or distributed in any way, in any medium,// in whole or in part, without prior written permission from Cadence.//// Copyright 2003-2005 Cadence Design Systems, Inc.// All Rights Reserved.//// $Author: shaun $// $Revision: 1.7 $// $Date: 2005/07/08 01:27:45 $// $State: Exp $// *****************************************************************************// *****************************************************************************#include "oaVerilogInPvt.h"BEGIN_VERILOG_NAMESPACE// *****************************************************************************// ParamList::ParamList()//// This is the constructor for a list of oaParam pointers. // *****************************************************************************ParamList::ParamList() : std::list<oaParam*>(){}// *****************************************************************************// ParamList::~ParamList()//// This is the destructor for lists of oaParams. The oaParams in the list are // deleted along with the list.// *****************************************************************************ParamList::~ParamList(){ while (!empty()) { delete front(); pop_front(); }}// *****************************************************************************// ParamList::append()//// This function adds a copy of the given oaParam to the end of the list.// *****************************************************************************voidParamList::append(const oaParam ¶m){ push_back(new oaParam(param));}// *****************************************************************************// ParamList::append()//// This function adds a copy of the elements in the given list onto the end of// this list.// *****************************************************************************voidParamList::append(const ParamList ¶mL){ for (ParamListIter iter = paramL.begin(); iter != paramL.end(); iter++) { append(**iter); }}// *****************************************************************************// ParamList::prefix()//// This function adds a copy of the given oaParam to the beginning of the list.// *****************************************************************************voidParamList::prefix(const oaParam ¶m){ push_front(new oaParam(param));}// *****************************************************************************// ParamList::find()//// This function searches for a parameter with the given name in the list. If// the parameter is found then the parameter is copied to the param argument and// the function returns true. If the parameter is not found, the the param// argument is left unchanged, and the function returns false.// *****************************************************************************oaBooleanParamList::find(const oaString &name, oaParam ¶m){ oaString paramName; for (ParamListIter iter = begin(); iter != end(); iter++) { (*iter)->getName(paramName); if (paramName == name) { param = **iter; return true; } } return false;}// *****************************************************************************// ParamList::clear()//// This function removes all elements form the ParamList.// *****************************************************************************voidParamList::clear(){ while (!empty()) { delete front(); pop_front(); }}END_VERILOG_NAMESPACE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -