Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
//## begin module%1.7%.codegen_version preserve=yes// Read the documentation to learn more about C++ code generator// versioning.//## end module%1.7%.codegen_version//## begin module%4209C5FB02C3.cm preserve=no//## end module%4209C5FB02C3.cm//## begin module%4209C5FB02C3.cp preserve=no// C O P Y R I G H T N O T I C E// This material is confidential to ERG and may not be disclosed in whole// or in part to any third party nor used in any manner whatsoever other// than for the purposes expressly consented to by ERG in writing.//// This material is also copyright and may not be reproduced, stored in a// retrieval system or transmitted in any form or by any means in whole or// in part without the express written consent of ERG.//## end module%4209C5FB02C3.cp//## Module: DefinedVariableTable%4209C5FB02C3; Pseudo Package body//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4//## Source file: Z:\MASS_Dev\Tools\TxnTestManager\src\DefinedVariableTable.cpp//## begin module%4209C5FB02C3.additionalIncludes preserve=no//## end module%4209C5FB02C3.additionalIncludes//## begin module%4209C5FB02C3.includes preserve=yes#pragma warn -com#include <LoggingMacros.h>#pragma warn +com//## end module%4209C5FB02C3.includes// DefinedVariable#include "DefinedVariable.h"// DefinedVariableTable#include "DefinedVariableTable.h"//## begin module%4209C5FB02C3.additionalDeclarations preserve=yes//## end module%4209C5FB02C3.additionalDeclarations// Class DefinedVariableTableDefinedVariableTable::DefinedVariableTable()//## begin DefinedVariableTable::DefinedVariableTable%4209C5FB02C3_const.initialization preserve=yes//## end DefinedVariableTable::DefinedVariableTable%4209C5FB02C3_const.initialization{//## begin DefinedVariableTable::DefinedVariableTable%4209C5FB02C3_const.body preserve=yes//## end DefinedVariableTable::DefinedVariableTable%4209C5FB02C3_const.body}DefinedVariableTable::~DefinedVariableTable(){//## begin DefinedVariableTable::~DefinedVariableTable%4209C5FB02C3_dest.body preserve=yesclear();//## end DefinedVariableTable::~DefinedVariableTable%4209C5FB02C3_dest.body}//## Other Operations (implementation)//## Operation: clear%4209C916032Fvoid DefinedVariableTable::clear (){//## begin DefinedVariableTable::clear%4209C916032F.body preserve=yesfor ( std::map< std::string, DefinedVariable * >::iteratorwhere = m_variable.begin();where != m_variable.end();++where ){delete where->second;where->second = 0;}//## end DefinedVariableTable::clear%4209C916032F.body}//## Operation: getDefinedVariable%4209C7770264DefinedVariable& DefinedVariableTable::getDefinedVariable (const std::string &variableName){//## begin DefinedVariableTable::getDefinedVariable%4209C7770264.body preserve=yesstd::map< std::string, DefinedVariable * >::const_iteratorinstance = m_variable.find( variableName );if ( instance != m_variable.end() ){return ( *instance->second );}else{DefinedVariable * object = 0;try{object = new DefinedVariable( variableName );if ( m_variable.insert(std::map< std::string, DefinedVariable * >::value_type(variableName,object ) ).second ){return ( *object );}else{MTHROW( std::runtime_error, \"Cannot add variable \"" \<< variableName \<< "\" to defined variable table." );}}catch ( ... ){delete object;object = 0;throw;}}//## end DefinedVariableTable::getDefinedVariable%4209C7770264.body}//## Operation: isVariable%420ACFBB01CEconst bool DefinedVariableTable::isVariable (const std::string &symbol) const{//## begin DefinedVariableTable::isVariable%420ACFBB01CE.body preserve=yesreturn ( m_variable.find( symbol ) != m_variable.end() );//## end DefinedVariableTable::isVariable%420ACFBB01CE.body}// Additional Declarations//## begin DefinedVariableTable%4209C5FB02C3.declarations preserve=yes//## end DefinedVariableTable%4209C5FB02C3.declarations//## begin module%4209C5FB02C3.epilog preserve=yes//## end module%4209C5FB02C3.epilog