Gaudi Framework, version v23r2

Home   Generated: Thu Jun 28 2012

IncludedFiles.cpp

Go to the documentation of this file.
00001 // $Id:$
00002 // ============================================================================
00003 // STD:
00004 // ============================================================================
00005 #include <assert.h>
00006 // ============================================================================
00007 // BOOST:
00008 // ============================================================================
00009 #include <boost/foreach.hpp>
00010 // ============================================================================
00011 #include "IncludedFiles.h"
00012 #include "Position.h"
00013 // ============================================================================
00014 namespace gp = Gaudi::Parsers;
00015 // ============================================================================
00016 bool gp::IncludedFiles::IsIncluded(const std::string& filename) const {
00017     return container_.find(filename) != container_.end();
00018 }
00019 // ============================================================================
00020 bool gp::IncludedFiles::AddFile(const std::string& filename,
00021         const Position& from){
00022     if (!IsIncluded(filename)) {
00023         container_.insert(Container::value_type(filename, from));
00024         return true;
00025     }
00026     return false;
00027 }
00028 // ============================================================================
00029 bool gp::IncludedFiles::GetPosition(const std::string& filename,
00030         const Position** pos) const {
00031     Container::const_iterator iter = container_.find(filename);
00032     if (iter != container_.end()) {
00033         *pos = &iter->second;
00034         assert(pos != NULL);
00035         return true;
00036     }
00037     return false;
00038 }
00039 // ============================================================================
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Thu Jun 28 2012 23:27:18 for Gaudi Framework, version v23r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004