From: <ag...@us...> - 2012-01-19 22:37:53
|
Revision: 2680 http://zoolib.svn.sourceforge.net/zoolib/?rev=2680&view=rev Author: agreen Date: 2012-01-19 22:37:47 +0000 (Thu, 19 Jan 2012) Log Message: ----------- Flesh-out shortcut access. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZVal_Yad.cpp trunk/zoolib/source/cxx/zoolib/ZVal_Yad.h Modified: trunk/zoolib/source/cxx/zoolib/ZVal_Yad.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZVal_Yad.cpp 2012-01-19 22:37:13 UTC (rev 2679) +++ trunk/zoolib/source/cxx/zoolib/ZVal_Yad.cpp 2012-01-19 22:37:47 UTC (rev 2680) @@ -81,6 +81,13 @@ bool ZVal_Yad::IsNull() const { return fYad; } +ZQ<ZVal_Yad> ZVal_Yad::QGet(const string8& iName) const + { + if (ZRef<ZYadMapRPos> theYad = fYad.DynamicCast<ZYadMapRPos>()) + return ZMap_Yad(theYad).QGet(iName); + return null; + } + ZVal_Yad ZVal_Yad::Get(const string8& iName) const { if (ZRef<ZYadMapRPos> theYad = fYad.DynamicCast<ZYadMapRPos>()) @@ -88,6 +95,13 @@ return ZVal_Yad(); } +ZQ<ZVal_Yad> ZVal_Yad::QGet(const size_t& iIndex) const + { + if (ZRef<ZYadSeqRPos> theYad = fYad.DynamicCast<ZYadSeqRPos>()) + return ZSeq_Yad(theYad).QGet(iIndex); + return null; + } + ZVal_Yad ZVal_Yad::Get(const size_t& iIndex) const { if (ZRef<ZYadSeqRPos> theYad = fYad.DynamicCast<ZYadSeqRPos>()) Modified: trunk/zoolib/source/cxx/zoolib/ZVal_Yad.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZVal_Yad.h 2012-01-19 22:37:13 UTC (rev 2679) +++ trunk/zoolib/source/cxx/zoolib/ZVal_Yad.h 2012-01-19 22:37:47 UTC (rev 2680) @@ -80,6 +80,7 @@ } // Shortcut access to values in an enclosed Map. + ZQ<ZVal_Yad> QGet(const string8& iName) const; ZVal_Yad Get(const string8& iName) const; template <class S> @@ -91,6 +92,7 @@ { return this->Get(iName).Get<S>(); } // Shortcut access to values in an enclosed Seq. + ZQ<ZVal_Yad> QGet(const size_t& iIndex) const; ZVal_Yad Get(const size_t& iIndex) const; template <class S> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |