|
|
@ -73,13 +73,18 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef NO_CXX2011 |
|
|
|
#if __cplusplus > 199711L |
|
|
|
#warning Old compiler (pre 2011): using boost as replacement for std |
|
|
|
namespace pcsc { |
|
|
|
|
|
|
|
template<typename T> struct shared_ptr { |
|
|
|
|
|
|
|
typedef std::shared_ptr<T> t; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
#warning Old compiler (pre 2011): using boost as replacement for std |
|
|
|
#include <boost/shared_ptr.hpp> |
|
|
|
#include <boost/shared_ptr.hpp> |
|
|
|
namespace std { |
|
|
|
namespace pcsc { |
|
|
|
template<class T> class shared_ptr: public boost::shared_ptr<T> { |
|
|
|
template<typename T> struct shared_ptr { |
|
|
|
public: |
|
|
|
typedef boost::shared_ptr<T> t; |
|
|
|
shared_ptr(T* p): boost::shared_ptr<T>(p) {} |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -532,7 +537,7 @@ namespace pcsc { |
|
|
|
if (_reader.find(name)==_reader.end()) |
|
|
|
if (_reader.find(name)==_reader.end()) |
|
|
|
_reader.insert |
|
|
|
_reader.insert |
|
|
|
(std::make_pair |
|
|
|
(std::make_pair |
|
|
|
(name, std::shared_ptr<Reader>(new Reader(name, *this)))); |
|
|
|
(name, shared_ptr<Reader>::t(new Reader(name, *this)))); |
|
|
|
return *_reader.find(name)->second; |
|
|
|
return *_reader.find(name)->second; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -841,7 +846,7 @@ namespace pcsc { |
|
|
|
bool _exc; |
|
|
|
bool _exc; |
|
|
|
SCARDCONTEXT _id; |
|
|
|
SCARDCONTEXT _id; |
|
|
|
long _state; |
|
|
|
long _state; |
|
|
|
std::map<std::string, std::shared_ptr<Reader> > _reader; |
|
|
|
std::map<std::string, shared_ptr<Reader>::t > _reader; |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|