From 10c36c18a9b034d36f9366872cc5979a38c7c372 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Thu, 1 Nov 2012 15:13:57 -0400 Subject: [PATCH] add constructor --- src/nt/ntnameValue.cpp | 6 ++++++ src/nt/ntnameValue.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/nt/ntnameValue.cpp b/src/nt/ntnameValue.cpp index ea8cfe0..4c2bb6e 100644 --- a/src/nt/ntnameValue.cpp +++ b/src/nt/ntnameValue.cpp @@ -65,6 +65,12 @@ NTNameValuePtr NTNameValue::create( return NTNameValuePtr(new NTNameValue(pvStructure)); } +NTNameValuePtr NTNameValue::create( + PVStructurePtr const & pvStructure) +{ + return NTNameValuePtr(new NTNameValue(pvStructure)); +} + NTNameValue::NTNameValue(PVStructure::shared_pointer const & pvStructure) : pvNTNameValue(pvStructure) { diff --git a/src/nt/ntnameValue.h b/src/nt/ntnameValue.h index 875bffe..632c40c 100644 --- a/src/nt/ntnameValue.h +++ b/src/nt/ntnameValue.h @@ -39,6 +39,8 @@ public: */ static NTNameValuePtr create( bool hasFunction,bool hasTimeStamp, bool hasAlarm); + static NTNameValuePtr create( + PVStructurePtr const & pvStructure); /** * Destructor */