Changeset 53:d059c5ffe169 in rrlib_logging


Ignore:
Timestamp:
05.03.2011 20:33:16 (10 years ago)
Author:
Max Reichardt <reichardt@…>
Branch:
default
Phase:
public
Convert:
svn:2179b62a-598e-4714-ba03-d8986cbf34aa/trunk@61
Message:

replaced std::tr1::shared_ptr with std::shared_ptr

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tLogDomain.h

    r51 r53  
    5656#include <cstdarg> 
    5757#include <cassert> 
    58 #include <tr1/memory> 
     58#include <memory> 
    5959 
    6060//---------------------------------------------------------------------- 
     
    8383//! Shared pointer to instances of tLogDomain for user space 
    8484class tLogDomain; 
    85 typedef std::tr1::shared_ptr<const tLogDomain> tLogDomainSharedPointer; 
     85typedef std::shared_ptr<const tLogDomain> tLogDomainSharedPointer; 
    8686 
    8787//---------------------------------------------------------------------- 
     
    202202  inline tLogStream GetMessageStream(const TDescription &description, const char *function, const char *file, unsigned int line, tLogLevel level) const 
    203203  { 
    204     tLogStream stream_proxy(std::tr1::shared_ptr<tLogStreamContext>(new tLogStreamContext(this->stream_buffer, mutex.get()))); 
     204    tLogStream stream_proxy(std::shared_ptr<tLogStreamContext>(new tLogStreamContext(this->stream_buffer, mutex.get()))); 
    205205    this->stream_buffer.Clear(); 
    206206    this->stream_buffer.InitializeMultiLinePadding(); 
     
    329329  mutable std::ofstream file_stream; 
    330330 
    331   std::tr1::shared_ptr<boost::recursive_mutex> mutex; 
     331  std::shared_ptr<boost::recursive_mutex> mutex; 
    332332 
    333333  /*! The ctor of a top level domain 
     
    353353   * \returns Shared Pointer to output mutex that is shared by all logging domains 
    354354   */ 
    355   static std::tr1::shared_ptr<boost::recursive_mutex> GetMutex() 
    356   { 
    357     static std::tr1::shared_ptr<boost::recursive_mutex> mutex(new boost::recursive_mutex()); 
     355  static std::shared_ptr<boost::recursive_mutex> GetMutex() 
     356  { 
     357    static std::shared_ptr<boost::recursive_mutex> mutex(new boost::recursive_mutex()); 
    358358    return mutex; 
    359359  } 
  • tLogDomainConfiguration.h

    r51 r53  
    6565//---------------------------------------------------------------------- 
    6666#include <string> 
    67 #include <tr1/memory> 
     67#include <memory> 
    6868 
    6969//---------------------------------------------------------------------- 
     
    152152 
    153153//! Shared pointer to instances of tLogDomainConfiguration 
    154 typedef std::tr1::shared_ptr<tLogDomainConfiguration> tLogDomainConfigurationSharedPointer; 
     154typedef std::shared_ptr<tLogDomainConfiguration> tLogDomainConfigurationSharedPointer; 
    155155 
    156156//---------------------------------------------------------------------- 
  • tLogDomainRegistry.cpp

    r51 r53  
    7878{ 
    7979  this->domain_configurations.push_back(tLogDomainConfigurationSharedPointer(new tLogDomainConfiguration("."))); 
    80   this->domains.push_back(std::tr1::shared_ptr<tLogDomain>(new tLogDomain(this->domain_configurations.back()))); 
     80  this->domains.push_back(std::shared_ptr<tLogDomain>(new tLogDomain(this->domain_configurations.back()))); 
    8181} 
    8282 
     
    8484// tLogDomainRegistry GetInstance 
    8585//---------------------------------------------------------------------- 
    86 std::tr1::shared_ptr<tLogDomainRegistry> tLogDomainRegistry::GetInstance() 
    87 { 
    88   static std::tr1::shared_ptr<tLogDomainRegistry> instance(new tLogDomainRegistry()); 
     86std::shared_ptr<tLogDomainRegistry> tLogDomainRegistry::GetInstance() 
     87{ 
     88  static std::shared_ptr<tLogDomainRegistry> instance(new tLogDomainRegistry()); 
    8989  return instance; 
    9090} 
     
    102102  { 
    103103    tLogDomainConfigurationSharedPointer configuration(this->GetConfigurationByName(full_qualified_domain_name)); 
    104     this->domains.push_back(std::tr1::shared_ptr<tLogDomain>(new tLogDomain(configuration, *const_cast<tLogDomain *>(parent.get())))); 
     104    this->domains.push_back(std::shared_ptr<tLogDomain>(new tLogDomain(configuration, *const_cast<tLogDomain *>(parent.get())))); 
    105105    return this->domains.back(); 
    106106  } 
  • tLogDomainRegistry.h

    r51 r53  
    5353#include <vector> 
    5454#include <string> 
    55 #include <tr1/memory> 
     55#include <memory> 
    5656 
    5757#ifdef _LIB_RRLIB_XML2_WRAPPER_PRESENT_ 
     
    107107   * \returns The only instance of this class that should exist 
    108108   */ 
    109   static std::tr1::shared_ptr<tLogDomainRegistry> GetInstance(); 
     109  static std::shared_ptr<tLogDomainRegistry> GetInstance(); 
    110110 
    111111  /*! Get the default domain 
     
    328328 
    329329  std::string file_name_prefix; 
    330   std::vector<std::tr1::shared_ptr<tLogDomain> > domains; 
     330  std::vector<std::shared_ptr<tLogDomain> > domains; 
    331331  std::vector<tLogDomainConfigurationSharedPointer> domain_configurations; 
    332332  std::string::size_type max_domain_name_length; 
  • tLogStream.h

    r51 r53  
    6161#include <boost/type_traits/is_base_of.hpp> 
    6262#include <boost/utility/enable_if.hpp> 
    63 #include <tr1/memory> 
     63#include <memory> 
    6464 
    6565//---------------------------------------------------------------------- 
     
    8585//! Shared pointer to instances of tLogDomain for user space 
    8686class tLogDomain; 
    87 typedef std::tr1::shared_ptr<const tLogDomain> tLogDomainSharedPointer; 
     87typedef std::shared_ptr<const tLogDomain> tLogDomainSharedPointer; 
    8888 
    8989//---------------------------------------------------------------------- 
     
    122122   * \param mutex    Mutex to acquire while this proxy is used 
    123123   */ 
    124   explicit tLogStream(std::tr1::shared_ptr<tLogStreamContext> stream_context) 
     124  explicit tLogStream(std::shared_ptr<tLogStreamContext> stream_context) 
    125125      : stream_context(stream_context) 
    126126  {} 
     
    463463private: 
    464464 
    465   std::tr1::shared_ptr<tLogStreamContext> stream_context; 
     465  std::shared_ptr<tLogStreamContext> stream_context; 
    466466 
    467467  // Prohibit assignment 
Note: See TracChangeset for help on using the changeset viewer.