Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
IncludedFiles.cpp
Go to the documentation of this file.
1 // ============================================================================
2 // STD:
3 // ============================================================================
4 #include <assert.h>
5 // ============================================================================
6 #include "IncludedFiles.h"
7 #include "Position.h"
8 // ============================================================================
9 namespace gp = Gaudi::Parsers;
10 // ============================================================================
11 bool gp::IncludedFiles::IsIncluded( const std::string& filename ) const {
12  return container_.find( filename ) != container_.end();
13 }
14 // ============================================================================
15 bool gp::IncludedFiles::AddFile( std::string filename, Position from ) {
16  return container_.emplace( std::move( filename ), std::move( from ) ).second;
17 }
18 // ============================================================================
19 bool gp::IncludedFiles::GetPosition( const std::string& filename, const Position** pos ) const {
20  auto iter = container_.find( filename );
21  if ( iter == container_.end() ) return false;
22  *pos = &iter->second;
23  assert( pos );
24  return true;
25 }
26 // ============================================================================
STL class.
T move(T...args)