eap::config split to eap::config and eap::packable

This commit is contained in:
2017-02-07 09:33:29 +01:00
parent 527d4271b1
commit 66dd2bf283
10 changed files with 136 additions and 130 deletions

View File

@@ -77,24 +77,6 @@ void eap::config::load(_In_ IXMLDOMNode *pConfigRoot)
}
void eap::config::operator<<(_Inout_ cursor_out &cursor) const
{
UNREFERENCED_PARAMETER(cursor);
}
size_t eap::config::get_pk_size() const
{
return 0;
}
void eap::config::operator>>(_Inout_ cursor_in &cursor)
{
UNREFERENCED_PARAMETER(cursor);
}
const bstr eap::config::namespace_eapmetadata(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata");

View File

@@ -20,10 +20,39 @@
#include "StdAfx.h"
#pragma comment(lib, "Ws2_32.lib")
using namespace std;
using namespace winstd;
//////////////////////////////////////////////////////////////////////
// eap::packable
//////////////////////////////////////////////////////////////////////
eap::packable::packable()
{
}
void eap::packable::operator<<(_Inout_ cursor_out &cursor) const
{
UNREFERENCED_PARAMETER(cursor);
}
size_t eap::packable::get_pk_size() const
{
return 0;
}
void eap::packable::operator>>(_Inout_ cursor_in &cursor)
{
UNREFERENCED_PARAMETER(cursor);
}
//////////////////////////////////////////////////////////////////////
// eap::diameter_avp_append
//////////////////////////////////////////////////////////////////////

View File

@@ -28,8 +28,7 @@ using namespace winstd;
// eap::ui_context
//////////////////////////////////////////////////////////////////////
eap::ui_context::ui_context(_In_ module &mod, _In_ config_connection &cfg, _In_ credentials_connection &cred) :
config(mod),
eap::ui_context::ui_context(_In_ config_connection &cfg, _In_ credentials_connection &cred) :
m_cfg(cfg),
m_cred(cred)
{
@@ -37,17 +36,17 @@ eap::ui_context::ui_context(_In_ module &mod, _In_ config_connection &cfg, _In_
eap::ui_context::ui_context(_In_ const ui_context &other) :
m_cfg (other.m_cfg ),
m_cred(other.m_cred),
config(other )
m_cfg (other.m_cfg ),
m_cred (other.m_cred),
packable(other )
{
}
eap::ui_context::ui_context(_Inout_ ui_context &&other) :
m_cfg ( other.m_cfg ),
m_cred( other.m_cred ),
config(std::move(other ))
m_cfg ( other.m_cfg ),
m_cred ( other.m_cred ),
packable(std::move(other ))
{
}
@@ -57,7 +56,7 @@ eap::ui_context& eap::ui_context::operator=(_In_ const ui_context &other)
if (this != &other) {
assert(std::addressof(m_cfg ) == std::addressof(other.m_cfg )); // Copy context within same configuration only!
assert(std::addressof(m_cred) == std::addressof(other.m_cred)); // Copy context within same credentials only!
(config&)*this = other;
(packable&)*this = other;
}
return *this;
@@ -69,7 +68,7 @@ eap::ui_context& eap::ui_context::operator=(_Inout_ ui_context &&other)
if (this != &other) {
assert(std::addressof(m_cfg ) == std::addressof(other.m_cfg )); // Move context within same configuration only!
assert(std::addressof(m_cred) == std::addressof(other.m_cred)); // Move context within same credentials only!
(config&)*this = std::move(other);
(packable&)*this = std::move(other);
}
return *this;
@@ -78,7 +77,7 @@ eap::ui_context& eap::ui_context::operator=(_Inout_ ui_context &&other)
void eap::ui_context::operator<<(_Inout_ cursor_out &cursor) const
{
config::operator<<(cursor);
packable::operator<<(cursor);
cursor << m_cfg ;
cursor << m_cred;
}
@@ -87,7 +86,7 @@ void eap::ui_context::operator<<(_Inout_ cursor_out &cursor) const
size_t eap::ui_context::get_pk_size() const
{
return
config::get_pk_size() +
packable::get_pk_size() +
pksizeof(m_cfg ) +
pksizeof(m_cred);
}
@@ -95,7 +94,7 @@ size_t eap::ui_context::get_pk_size() const
void eap::ui_context::operator>>(_Inout_ cursor_in &cursor)
{
config::operator>>(cursor);
packable::operator>>(cursor);
cursor >> m_cfg ;
cursor >> m_cred;
}