Changeset 8fd1737 in tol


Ignore:
Timestamp:
Dec 16, 2009, 8:50:57 AM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
6d9a5e9
Parents:
dac8deb
Message:

Tracing operator for boost-spirit parser

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@1819 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/vmatrix_type/tol_bvmat_bsr_impl.h

    rdac8deb r8fd1737  
    266266  void  operator()(IteratorT first, IteratorT last) const { action(); }
    267267};
     268
     269///////////////////////////////////////////////////////////////////////////////
     270class trace_msg
     271///////////////////////////////////////////////////////////////////////////////
     272{
     273  const std::string& msg_;
     274public:
     275  trace_msg(std::string& msg) : msg_(msg) {}
     276  void action(const std::string& str) const
     277  {
     278    Std(BSR()+"TRACE "+msg_.c_str()+" : '"+str.c_str()+"'");
     279  }
     280  void operator()(const std::string& str) const
     281  {
     282    action(str);
     283  }
     284  template<typename IteratorT>
     285  void operator()(IteratorT first, IteratorT last) const
     286  {
     287    std::string str;
     288    str.assign(first, last);
     289    action(str);
     290  }};
    268291
    269292
Note: See TracChangeset for help on using the changeset viewer.