Coverage for /Syzygy/msf/msf_file_impl.h

CoverageLines executed / instrumented / missingexe / inst / missLanguageGroup
100.0%26260.C++source

Line-by-line coverage:

   1    :  // Copyright 2012 Google Inc. All Rights Reserved.
   2    :  //
   3    :  // Licensed under the Apache License, Version 2.0 (the "License");
   4    :  // you may not use this file except in compliance with the License.
   5    :  // You may obtain a copy of the License at
   6    :  //
   7    :  //     http://www.apache.org/licenses/LICENSE-2.0
   8    :  //
   9    :  // Unless required by applicable law or agreed to in writing, software
  10    :  // distributed under the License is distributed on an "AS IS" BASIS,
  11    :  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12    :  // See the License for the specific language governing permissions and
  13    :  // limitations under the License.
  14    :  //
  15    :  // Internal implementation details for msf_file.h. Not meant to be included
  16    :  // directly.
  17    :  
  18    :  #ifndef SYZYGY_MSF_MSF_FILE_IMPL_H_
  19    :  #define SYZYGY_MSF_MSF_FILE_IMPL_H_
  20    :  
  21    :  #include "base/logging.h"
  22    :  #include "base/memory/ref_counted.h"
  23    :  #include "syzygy/msf/msf_decl.h"
  24    :  
  25    :  namespace msf {
  26    :  namespace detail {
  27    :  
  28    :  template <MsfFileType T>
  29  E :  MsfFileImpl<T>::MsfFileImpl() {
  30  E :  }
  31    :  
  32    :  template <MsfFileType T>
  33  E :  MsfFileImpl<T>::~MsfFileImpl() {
  34  E :    Clear();
  35  E :  }
  36    :  
  37    :  template <MsfFileType T>
  38  E :  void MsfFileImpl<T>::Clear() {
  39  E :    streams_.clear();
  40  E :  }
  41    :  
  42    :  template <MsfFileType T>
  43    :  scoped_refptr<MsfStreamImpl<T>> MsfFileImpl<T>::GetStream(
  44  E :      uint32_t index) const {
  45  E :    DCHECK_LT(index, streams_.size());
  46  E :    return streams_[index];
  47  E :  }
  48    :  
  49    :  template <MsfFileType T>
  50  E :  size_t MsfFileImpl<T>::AppendStream(MsfStreamImpl<T>* msf_stream) {
  51  E :    size_t index = streams_.size();
  52  E :    streams_.push_back(msf_stream);
  53  E :    return index;
  54  E :  }
  55    :  
  56    :  template <MsfFileType T>
  57    :  void MsfFileImpl<T>::ReplaceStream(uint32_t index,
  58  E :                                     MsfStreamImpl<T>* msf_stream) {
  59  E :    DCHECK_LT(index, streams_.size());
  60  E :    streams_[index] = msf_stream;
  61  E :  }
  62    :  
  63    :  template <MsfFileType T>
  64  E :  void MsfFileImpl<T>::SetStream(uint32_t index, MsfStreamImpl<T>* msf_stream) {
  65  E :    if (index >= streams_.size())
  66  E :      streams_.resize(index + 1);
  67    :  
  68  E :    streams_[index] = msf_stream;
  69  E :  }
  70    :  
  71    :  }  // namespace detail
  72    :  }  // namespace msf
  73    :  
  74    :  #endif  // SYZYGY_MSF_MSF_FILE_IMPL_H_

Coverage information generated Fri Jul 29 11:00:21 2016.