cert_store updated to be able to member a non-copyable class
This commit is contained in:
parent
8a0799c2b7
commit
2118f92e9a
@ -548,6 +548,25 @@ namespace winstd
|
||||
class WINSTD_API cert_store : public handle<HCERTSTORE>
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Initializes a new class instance with the object handle set to NULL.
|
||||
///
|
||||
inline cert_store() : handle<HCERTSTORE>() {}
|
||||
|
||||
///
|
||||
/// Initializes a new class instance with an already available object handle.
|
||||
///
|
||||
/// \param[in] h Initial object handle value
|
||||
///
|
||||
inline cert_store(_In_opt_ handle_type h) : handle<HCERTSTORE>(h) {}
|
||||
|
||||
///
|
||||
/// Move constructor
|
||||
///
|
||||
/// \param[inout] h A rvalue reference of another object
|
||||
///
|
||||
inline cert_store(_Inout_ cert_store &&h) : handle<HCERTSTORE>(std::move(h)) {}
|
||||
|
||||
///
|
||||
/// Closes the certificate store.
|
||||
///
|
||||
@ -555,6 +574,18 @@ namespace winstd
|
||||
///
|
||||
virtual ~cert_store();
|
||||
|
||||
///
|
||||
/// Move assignment
|
||||
///
|
||||
/// \param[inout] h A rvalue reference of another object
|
||||
///
|
||||
cert_store& operator=(_Inout_ cert_store &&h)
|
||||
{
|
||||
if (this != std::addressof(h))
|
||||
*(handle<handle_type>*)this = std::move(h);
|
||||
return *this;
|
||||
}
|
||||
|
||||
///
|
||||
/// Opens the certificate store.
|
||||
///
|
||||
@ -593,6 +624,11 @@ namespace winstd
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
// This class is noncopyable.
|
||||
cert_store(_In_ const cert_store &h);
|
||||
cert_store& operator=(_In_ const cert_store &h);
|
||||
|
||||
protected:
|
||||
///
|
||||
/// Closes the certificate store.
|
||||
|
Loading…
x
Reference in New Issue
Block a user