You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
(25) |
Apr
(97) |
May
(56) |
Jun
(29) |
Jul
(65) |
Aug
(18) |
Sep
(14) |
Oct
(114) |
Nov
(12) |
Dec
(40) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(44) |
Feb
(47) |
Mar
(109) |
Apr
(114) |
May
(47) |
Jun
(36) |
Jul
(8) |
Aug
(23) |
Sep
(111) |
Oct
(64) |
Nov
(57) |
Dec
(26) |
2004 |
Jan
(2) |
Feb
(18) |
Mar
(11) |
Apr
(1) |
May
(52) |
Jun
(70) |
Jul
(37) |
Aug
(24) |
Sep
(4) |
Oct
(27) |
Nov
(4) |
Dec
(29) |
2005 |
Jan
(8) |
Feb
(36) |
Mar
(71) |
Apr
(31) |
May
(42) |
Jun
(2) |
Jul
(53) |
Aug
(43) |
Sep
(41) |
Oct
(55) |
Nov
(59) |
Dec
(51) |
2006 |
Jan
(36) |
Feb
(36) |
Mar
(19) |
Apr
(85) |
May
(33) |
Jun
(10) |
Jul
(110) |
Aug
(44) |
Sep
(10) |
Oct
(123) |
Nov
(27) |
Dec
|
2007 |
Jan
(34) |
Feb
(16) |
Mar
(21) |
Apr
(53) |
May
(6) |
Jun
(8) |
Jul
(117) |
Aug
(10) |
Sep
(131) |
Oct
(13) |
Nov
(8) |
Dec
(46) |
2008 |
Jan
(47) |
Feb
(44) |
Mar
(66) |
Apr
(2) |
May
(29) |
Jun
(37) |
Jul
(13) |
Aug
(22) |
Sep
(32) |
Oct
(55) |
Nov
(60) |
Dec
(108) |
2009 |
Jan
(23) |
Feb
(103) |
Mar
(98) |
Apr
(21) |
May
(78) |
Jun
(141) |
Jul
(130) |
Aug
(60) |
Sep
(56) |
Oct
(51) |
Nov
(26) |
Dec
(17) |
2010 |
Jan
(48) |
Feb
(49) |
Mar
(42) |
Apr
(123) |
May
(38) |
Jun
(89) |
Jul
(34) |
Aug
(64) |
Sep
(31) |
Oct
(113) |
Nov
(20) |
Dec
(104) |
2011 |
Jan
(110) |
Feb
(70) |
Mar
(43) |
Apr
(30) |
May
(48) |
Jun
(115) |
Jul
(186) |
Aug
(17) |
Sep
(69) |
Oct
(77) |
Nov
(25) |
Dec
(25) |
2012 |
Jan
(49) |
Feb
(9) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ag...@us...> - 2012-01-26 17:17:36
|
Revision: 2686 http://zoolib.svn.sourceforge.net/zoolib/?rev=2686&view=rev Author: agreen Date: 2012-01-26 17:17:25 +0000 (Thu, 26 Jan 2012) Log Message: ----------- Add NonConst and DynNonConst template functions. Move null into ZooLib namespace. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/zconfigl.h Modified: trunk/zoolib/source/cxx/zoolib/zconfigl.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/zconfigl.h 2012-01-26 04:16:33 UTC (rev 2685) +++ trunk/zoolib/source/cxx/zoolib/zconfigl.h 2012-01-26 17:17:25 UTC (rev 2686) @@ -309,15 +309,48 @@ // empty value of some sort, but where we don't want to have to manually create the value each time. #ifdef __cplusplus - const class notnull_t {} notnull = {}; - const struct null_t - { - const notnull_t operator!() const { return notnull; } - } null = {}; + +namespace ZooLib { + +const class notnull_t {} notnull = {}; + +const struct null_t + { + const notnull_t operator!() const { return notnull; } + } null = {}; + +} // namespace ZooLib + #endif // ================================================================================================= +#ifdef __cplusplus + +namespace ZooLib { + +template <class T> +T* NonConst(const T* iT) + { return const_cast<T*>(iT); } + +template <class T> +T& NonConst(const T& iT) + { return const_cast<T&>(iT); } + +template <class P, class T> +P DynNonConst(const T* iT) + { return dynamic_cast<P>(NonConst(iT)); } + +template <class P, class T> +P DynNonConst(const T& iT) + { return dynamic_cast<P>(NonConst(iT)); } + +} // namespace ZooLib + +#endif + +// ================================================================================================= + #if __MACH__ #define ZMACINCLUDE2(a,b) <a/b> #if __MWERKS__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-26 04:16:39
|
Revision: 2685 http://zoolib.svn.sourceforge.net/zoolib/?rev=2685&view=rev Author: agreen Date: 2012-01-26 04:16:33 +0000 (Thu, 26 Jan 2012) Log Message: ----------- Changes suggested by clang static analysis. Migrate some stuff into zconfigl.h so it's less clumsy to use. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZDCPixmapBlitPriv.h trunk/zoolib/source/cxx/zoolib/ZDList.h trunk/zoolib/source/cxx/zoolib/ZDebug.cpp trunk/zoolib/source/cxx/zoolib/ZDebug.h trunk/zoolib/source/cxx/zoolib/ZFile_POSIX.cpp trunk/zoolib/source/cxx/zoolib/ZMACRO_typeof.h trunk/zoolib/source/cxx/zoolib/ZQ.h trunk/zoolib/source/cxx/zoolib/ZRGBA.h trunk/zoolib/source/cxx/zoolib/ZSet_T.h trunk/zoolib/source/cxx/zoolib/ZStrim.h trunk/zoolib/source/cxx/zoolib/ZString.h trunk/zoolib/source/cxx/zoolib/ZThread.h trunk/zoolib/source/cxx/zoolib/ZWinCOM.h trunk/zoolib/source/cxx/zoolib/zconfigd.h trunk/zoolib/source/cxx/zoolib/zconfigl.h Modified: trunk/zoolib/source/cxx/zoolib/ZDCPixmapBlitPriv.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZDCPixmapBlitPriv.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZDCPixmapBlitPriv.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -1540,7 +1540,6 @@ iDestB.left, iDestPD); - ZRGBA_POD theColor = iColor; for (;;) { int destCountH = destWidth + 1; @@ -1617,7 +1616,6 @@ iDestB.left, iDestPD); - ZRGBA_POD theColor = iColor; for (;;) { int destCountH = destWidth + 1; @@ -1674,6 +1672,7 @@ { switch (iOp) { + default: case eOp_Copy: { sTile_SD_T(iSource, iSourceRD, iSourceB, iSourcePD, @@ -1711,6 +1710,7 @@ { switch (iOp) { + default: case eOp_Copy: { sCopy_SD_T(iSource, iSourceRD, iSourcePD, @@ -1749,6 +1749,7 @@ { switch (iOp) { + default: case eOp_Copy: { sTile_SMD_T(iSource, iSourceRD, iSourceB, iSourcePD, @@ -1796,6 +1797,7 @@ { switch (iOp) { + default: case eOp_Copy: { sTileSource_SMD_T(iSource, iSourceRD, iSourceB, iSourcePD, @@ -1843,6 +1845,7 @@ { switch (iOp) { + default: case eOp_Copy: { sTileMatte_SMD_T(iSource, iSourceRD, iSourcePD, @@ -1890,6 +1893,7 @@ { switch (iOp) { + default: case eOp_Copy: { sCopy_SMD_T(iSource, iSourceRD, iSourcePD, @@ -1934,6 +1938,7 @@ { switch (iOp) { + default: case eOp_Copy: { sFillPixval(oDest, iDestRD, iDestB, iDestPD.AsPixval(iColor)); @@ -1967,6 +1972,7 @@ { switch (iOp) { + default: case eOp_Copy: { sColor_MD_T(iMatte, iMatteRD, iMattePD, @@ -2007,6 +2013,7 @@ { switch (iOp) { + default: case eOp_Copy: { sColorTile_MD_T(iMatte, iMatteRD, iMatteB, iMattePD, Modified: trunk/zoolib/source/cxx/zoolib/ZDList.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZDList.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZDList.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -58,7 +58,7 @@ size_t Size() const { return fSize; } - bool Empty() const + bool IsEmpty() const { ZAssertStop(L::kDebug, (!fSize && !fHeadL) || (fSize && fHeadL)); return !fHeadL; Modified: trunk/zoolib/source/cxx/zoolib/ZDebug.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZDebug.cpp 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZDebug.cpp 2012-01-26 04:16:33 UTC (rev 2685) @@ -22,7 +22,6 @@ #include "zoolib/ZDebug.h" #include "zoolib/ZFunctionChain.h" #include "zoolib/ZCONFIG_SPI.h" -#include "zoolib/ZTypes.h" #include <stdio.h> #include <string.h> @@ -209,9 +208,9 @@ mov eax, 0x18 mov eax, es:[eax] sub eax, 0x10 -#ifdef xor -#undef xor -#endif + #ifdef xor + #undef xor + #endif xor eax, [threadID] mov [obfuscator], eax } @@ -278,3 +277,16 @@ } // namespace ZDebug } // namespace ZooLib + +// ================================================================================================= +// MARK: - ZUnimplemented + +namespace ZooLib { + +// I'd like to formalize ZUnimplemented a little more sometime. +// Perhaps it should throw an exception in production code. + +void ZUnimplemented() + { ZDebugStopf(0, ("Unimplemented routine")); } + +} // namespace ZooLib Modified: trunk/zoolib/source/cxx/zoolib/ZDebug.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZDebug.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZDebug.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -25,12 +25,12 @@ #include <cstdarg> // For std::va_list #include <cstddef> // For std::size_t +// ================================================================================================= +// MARK: - ZDebug + namespace ZooLib { namespace ZDebug { -// ================================================================================================= -// MARK: - ZDebug - struct Params_t { int fLevel; @@ -96,14 +96,21 @@ #define ZAssertCompile(a) typedef ZooLib::ZDebug::AssertCompile<(a)>::IsValid ZAssertCompileValid -// I'd like to formalize ZUnimplemented a little more sometime. Perhaps it should -// throw an exception in production code. -#define ZUnimplemented() ZDebugStopf(0, ("Unimplemented routine")) - // There are still quite a lot of places where plain old ZAssert is used. -#define ZAssert(a) ZAssertStop(0, a) +#ifndef ZAssert + #define ZAssert(a) ZAssertStop(0, a) +#endif } // namespace ZDebug } // namespace ZooLib +// ================================================================================================= +// MARK: - ZUnimplemented + +namespace ZooLib { + +void ZUnimplemented() ZMACRO_Attribute_NoReturn; + +} // namespace ZooLib + #endif // __ZDebug_h__ Modified: trunk/zoolib/source/cxx/zoolib/ZFile_POSIX.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZFile_POSIX.cpp 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZFile_POSIX.cpp 2012-01-26 04:16:33 UTC (rev 2685) @@ -536,9 +536,7 @@ } } -#if ZCONFIG(Compiler,GCC) -__attribute__((unused)) -#endif +ZMACRO_Attribute_Unused static void spSplit(char iSep, bool iIncludeEmpties, const string& iPath, vector<string>& oComps) { if (size_t length = iPath.length()) Modified: trunk/zoolib/source/cxx/zoolib/ZMACRO_typeof.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZMACRO_typeof.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZMACRO_typeof.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -21,10 +21,8 @@ #ifndef __ZMACRO_typeof_h__ #define __ZMACRO_typeof_h__ 1 -#if defined(_MSC_VER) +#if not defined(_MSC_VER) -#if 0 - #elif _MSC_VER >= 1600 // Visual C++ 2010 @@ -58,6 +56,9 @@ // 2) var_type_id(expersssion) // 3) type_of(expression) +namespace ZooLib { +namespace MACRO_auto { + // IMPLEMENTATION template<int ID> class CTypeRegRoot @@ -104,9 +105,9 @@ // type_id #define type_id(type) \ (CProvideCounterValue< \ - /*register TYPE--ID*/ typename CTypeReg<type, CCountOf<type >::count>::Dummy, \ - /*increment compile-time Counter*/ CCounter<CCountOf<type >::count>, \ - /*pass value of Counter*/CCountOf<type >::count \ + typename CTypeReg<type, CCountOf<type >::count>::Dummy, \ + CCounter<CCountOf<type >::count>, \ + CCountOf<type >::count \ >::value) // Lets type_id() be > than 0 @@ -139,6 +140,5 @@ #define ZMACRO_auto_(name,expr) ZMACRO_typeof(expr) name = (expr) #endif // _MSV_VER -#endif // defined(_MSC_VER) #endif // __ZMACRO_typeof_h__ Modified: trunk/zoolib/source/cxx/zoolib/ZQ.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZQ.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZQ.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -296,12 +296,7 @@ } private: - #if ZCONFIG(Compiler,GCC) - char fBytes[sizeof(T)] __attribute__((aligned)); - #else - char fBytes[sizeof(T)]; - #endif - + char fBytes[sizeof(T)] ZMACRO_Attribute_Aligned; bool fHasValue; }; Modified: trunk/zoolib/source/cxx/zoolib/ZRGBA.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZRGBA.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZRGBA.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -211,9 +211,9 @@ bool operator<(const ZRGBA_POD& other) const { - return red < other.red || - red == other.red && green < other.green || - red == other.red && green == other.green && blue < other.blue; + return (red < other.red) + || (red == other.red && green < other.green) + || (red == other.red && green == other.green && blue < other.blue); } }; Modified: trunk/zoolib/source/cxx/zoolib/ZSet_T.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZSet_T.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZSet_T.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -82,7 +82,7 @@ ZSet_T& Insert(const T& iElem); ZSet_T& Erase(const T& iElem); - bool Empty() const; + bool IsEmpty() const; const Base_t& GetElems() const; @@ -290,7 +290,7 @@ } template <class T, class Comparator> -bool ZSet_T<T,Comparator>::Empty() const +bool ZSet_T<T,Comparator>::IsEmpty() const { return this->empty(); } template <class T, class Comparator> Modified: trunk/zoolib/source/cxx/zoolib/ZStrim.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZStrim.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZStrim.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -27,14 +27,6 @@ #include <stdarg.h> // For va_list #include <stdexcept> // For range_error -#ifndef ZMACRO_Attribute_Format_Printf - #if ZCONFIG(Compiler,GCC) - #define ZMACRO_Attribute_Format_Printf(m,n) __attribute__((format(printf,m,n))) - #else - #define ZMACRO_Attribute_Format_Printf(m,n) - #endif -#endif - namespace ZooLib { class ZStrimW; Modified: trunk/zoolib/source/cxx/zoolib/ZString.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZString.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZString.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -25,20 +25,11 @@ #include <cstdarg> #include <string> -#ifndef ZMACRO_Attribute_Format_printf - #if ZCONFIG(Compiler,GCC) - #define ZMACRO_Attribute_Format_printf(m,n) __attribute__((format(printf,m,n))) - #else - #define ZMACRO_Attribute_Format_printf(m,n) - #endif -#endif +// ================================================================================================= -// ================================================== - namespace ZooLib { -std::string ZStringf(const char* iString, ...) - ZMACRO_Attribute_Format_printf(1,2); +std::string ZStringf(const char* iString, ...) ZMACRO_Attribute_Format_Printf(1,2); std::string ZStringf(const char* iString, std::va_list iArgs); Modified: trunk/zoolib/source/cxx/zoolib/ZThread.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZThread.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZThread.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -140,11 +140,7 @@ { // Useful when debugging under GDB, which (on MacOS) doesn't always // tell us what pthread_id corresponds to a thread. - #if ZCONFIG(Compiler,GCC) - const ZThread::ID theThreadID __attribute__((unused)) = ZThread::sID(); - #else - const ZThread::ID theThreadID = ZThread::sID(); - #endif + const ZThread::ID theThreadID ZMACRO_Attribute_Unused = ZThread::sID(); sStarted(); Modified: trunk/zoolib/source/cxx/zoolib/ZWinCOM.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZWinCOM.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/ZWinCOM.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -125,14 +125,9 @@ { return fHRESULT; } private: - #if ZCONFIG(Compiler,GCC) - mutable char fBytes[sizeof(T)] __attribute__((aligned)); - #else - mutable char fBytes[sizeof(T)]; - #endif - - mutable bool fHasValue; + mutable char fBytes[sizeof(T)] ZMACRO_Attribute_Aligned; const HRESULT fHRESULT; + mutable bool fHasValue; }; // ================================================================================================= Modified: trunk/zoolib/source/cxx/zoolib/zconfigd.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/zconfigd.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/zconfigd.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -18,8 +18,8 @@ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------------------------- */ -#ifndef __zconfigd__ -#define __zconfigd__ 1 +#ifndef __zconfigd_h__ +#define __zconfigd_h__ 1 // Which compiler -- ZCONFIG_Compiler #define ZCONFIG_Compiler_CodeWarrior 1 @@ -47,4 +47,4 @@ // on CW, DEBUG defined on gcc). You should therefore define ZCONFIG_DebugLevel in your zconfig.h // file if it needs to be different from the default value of 1. -#endif // __zconfigd__ +#endif // __zconfigd_h__ Modified: trunk/zoolib/source/cxx/zoolib/zconfigl.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/zconfigl.h 2012-01-26 04:15:29 UTC (rev 2684) +++ trunk/zoolib/source/cxx/zoolib/zconfigl.h 2012-01-26 04:16:33 UTC (rev 2685) @@ -18,8 +18,8 @@ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------------------------- */ -#ifndef __zconfigl__ -#define __zconfigl__ 1 +#ifndef __zconfigl_h__ +#define __zconfigl_h__ 1 // Ensure our definitions have been set up #include "zoolib/zconfigd.h" @@ -92,17 +92,17 @@ #ifndef ZCONFIG_Endian # if 0 -# elif (ZCONFIG_Processor == ZCONFIG_Processor_PPC) +# elif ZCONFIG(Processor, PPC) # define ZCONFIG_Endian ZCONFIG_Endian_Big -# elif (ZCONFIG_Processor == ZCONFIG_Processor_PPC_64) +# elif ZCONFIG(Processor, PPC_64) # define ZCONFIG_Endian ZCONFIG_Endian_Big -# elif (ZCONFIG_Processor == ZCONFIG_Processor_68K) +# elif ZCONFIG(Processor, 68K) # define ZCONFIG_Endian ZCONFIG_Endian_Big -# elif (ZCONFIG_Processor == ZCONFIG_Processor_x86) +# elif ZCONFIG(Processor, x86) # define ZCONFIG_Endian ZCONFIG_Endian_Little -# elif (ZCONFIG_Processor == ZCONFIG_Processor_x86_64) +# elif ZCONFIG(Processor, x86_64) # define ZCONFIG_Endian ZCONFIG_Endian_Little -# elif (ZCONFIG_Processor == ZCONFIG_Processor_ARM) +# elif ZCONFIG(Processor, ARM) # define ZCONFIG_Endian ZCONFIG_Endian_Little # endif #endif @@ -116,9 +116,9 @@ #ifndef ZCONFIG_Is64Bit # if 0 -# elif (ZCONFIG_Processor == ZCONFIG_Processor_PPC_64) +# elif ZCONFIG(Processor, PPC_64) # define ZCONFIG_Is64Bit 1 -# elif (ZCONFIG_Processor == ZCONFIG_Processor_x86_64) +# elif ZCONFIG(Processor, x86_64) # define ZCONFIG_Is64Bit 1 # endif #endif @@ -148,6 +148,12 @@ // With XCode we could base debug off !__OPTIMIZE__ #ifndef ZCONFIG_Debug # if 0 +# elif defined(__MACH__) +# if not defined(__OPTIMIZE__) +# define ZCONFIG_Debug ZCONFIG_DebugLevel +# else +# define ZCONFIG_Debug 0 +# endif # elif defined(__MWERKS__) # if __option(sym) # define ZCONFIG_Debug ZCONFIG_DebugLevel @@ -155,7 +161,7 @@ # define ZCONFIG_Debug 0 # endif # elif defined(_MSC_VER) -# if defined(_DEBUG) +# if defined(DEBUG) || defined(_DEBUG) # define ZCONFIG_Debug ZCONFIG_DebugLevel # else # define ZCONFIG_Debug 0 @@ -254,6 +260,7 @@ // inherits 'XXX' via dominance # pragma warning(disable:4250) + #else typedef wchar_t __wchar_t; @@ -265,27 +272,34 @@ // Objective C we're switching to use the soon-to-be standardized nullptr. #ifdef __cplusplus - #ifdef __MWERKS__ + + #if 0 + #elif defined(_MSC_VER) && _MSC_VER >= 1600 + + // nullptr is naturally available + + #elif defined(__MWERKS__) + class nullptr_t { + void operator&() const; public: template <class T> operator T*() const { return 0; } - private: - void operator&() const; }; #define nullptr nullptr_t() - #elif _MSC_VER >= 1600 - // nullptr is naturally available + #else + const class nullptr_t { + void operator&() const; public: template <class T> operator T*() const { return 0; } template <class C, class T> operator T C::*() const { return 0; } - private: - void operator&() const; } nullptr = {}; + #endif + #elif not defined(nullptr) #define nullptr 0 #endif @@ -296,14 +310,14 @@ #ifdef __cplusplus const class notnull_t {} notnull = {}; - const class null_t + const struct null_t { - public: const notnull_t operator!() const { return notnull; } } null = {}; #endif // ================================================================================================= + #if __MACH__ #define ZMACINCLUDE2(a,b) <a/b> #if __MWERKS__ @@ -316,9 +330,13 @@ #define ZMACINCLUDE3(a,b,c) <c> #endif +// ================================================================================================= + #define ZMACRO_Concat_(x, y) x ## y #define ZMACRO_Concat(x, y) ZMACRO_Concat_(x,y) +// ================================================================================================= + #ifdef __cplusplus #define ZMACRO_ExternC_Begin extern "C" { #define ZMACRO_ExternC_End } // extern "C" @@ -327,8 +345,12 @@ #define ZMACRO_ExternC_End #endif +// ================================================================================================= + #define ZMACRO_Stringify(a) #a +// ================================================================================================= + #if defined(_MSC_VER) #include "zoolib/ZMACRO_typeof.h" #else @@ -339,5 +361,38 @@ #define ZMACRO_auto_(name,expr) ZMACRO_typeof(expr) name = (expr) #endif +// ================================================================================================= -#endif // __zconfigl__ +#ifndef ZMACRO_Attribute_Format_Printf + #if ZCONFIG(Compiler,GCC) + #define ZMACRO_Attribute_Format_Printf(m,n) __attribute__((format(printf,m,n))) + #else + #define ZMACRO_Attribute_Format_Printf(m,n) + #endif +#endif + +#ifndef ZMACRO_Attribute_Aligned + #if ZCONFIG(Compiler,GCC) + #define ZMACRO_Attribute_Aligned __attribute__((aligned)) + #else + #define ZMACRO_Attribute_Aligned + #endif +#endif + +#ifndef ZMACRO_Attribute_NoReturn + #if ZCONFIG(Compiler,GCC) + #define ZMACRO_Attribute_NoReturn __attribute__((noreturn)) + #else + #define ZMACRO_Attribute_NoReturn + #endif +#endif + +#ifndef ZMACRO_Attribute_Unused + #if ZCONFIG(Compiler,GCC) + #define ZMACRO_Attribute_Unused __attribute__((unused)) + #else + #define ZMACRO_Attribute_Unused + #endif +#endif + +#endif // __zconfigl_h__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-26 04:15:36
|
Revision: 2684 http://zoolib.svn.sourceforge.net/zoolib/?rev=2684&view=rev Author: agreen Date: 2012-01-26 04:15:29 +0000 (Thu, 26 Jan 2012) Log Message: ----------- Conform to Empty-->IsEmpty change. Modified Paths: -------------- trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_SQLite.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_Union.cpp Modified: trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp 2012-01-25 19:28:33 UTC (rev 2683) +++ trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp 2012-01-26 04:15:29 UTC (rev 2684) @@ -324,7 +324,7 @@ PQuery* thePQuery = theClientQuery->fPQuery; thePQuery->fClientQuery_InPQuery.Erase(theClientQuery); - if (thePQuery->fClientQuery_InPQuery.Empty()) + if (thePQuery->fClientQuery_InPQuery.IsEmpty()) { // Detach from any depended-upon PSearch for (set<PSearch*>::iterator iterPSearch = thePQuery->fPSearch_Used.begin(); @@ -345,7 +345,7 @@ fMap_Refcon_ClientQuery.erase(iterClientQuery); } - if (!fClientQuery_NeedsWork.Empty() || !fPQuery_NeedsWork.Empty()) + if (!fClientQuery_NeedsWork.IsEmpty() || !fPQuery_NeedsWork.IsEmpty()) { guard.Release(); Source::pTriggerResultsAvailable(); Modified: trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_SQLite.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_SQLite.cpp 2012-01-25 19:28:33 UTC (rev 2683) +++ trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_SQLite.cpp 2012-01-26 04:15:29 UTC (rev 2684) @@ -161,7 +161,7 @@ PQuery* thePQuery = theClientQuery->fPQuery; thePQuery->fClientQueries.Erase(theClientQuery); - if (thePQuery->fClientQueries.Empty()) + if (thePQuery->fClientQueries.IsEmpty()) ZUtil_STL::sEraseMustContain(kDebug, fMap_Rel_PQuery, thePQuery->fRel); fMap_RefconToClientQuery.erase(iterClientQuery); Modified: trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_Union.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_Union.cpp 2012-01-25 19:28:33 UTC (rev 2683) +++ trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_Union.cpp 2012-01-26 04:15:29 UTC (rev 2684) @@ -767,7 +767,7 @@ thePQuery->fClientQueries.Erase(theClientQuery); - if (thePQuery->fClientQueries.Empty()) + if (thePQuery->fClientQueries.IsEmpty()) { for (set<ZRef<Proxy> >::iterator iterProxies = thePQuery->fProxiesDependedUpon.begin(), @@ -888,7 +888,7 @@ // ----------------- - if (!fPQuery_NeedsWork.Empty()) + if (!fPQuery_NeedsWork.IsEmpty()) { ZLOGPF(s, eDebug+1); @@ -1074,7 +1074,7 @@ if (not iProxy->FinishFinalize()) return; - ZAssertStop(kDebug, iProxy->fPIP_InProxy.Empty()); + ZAssertStop(kDebug, iProxy->fPIP_InProxy.IsEmpty()); ZUtil_STL::sEraseMustContain(kDebug, fProxyMap, iProxy->fRel); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-25 19:28:40
|
Revision: 2683 http://zoolib.svn.sourceforge.net/zoolib/?rev=2683&view=rev Author: agreen Date: 2012-01-25 19:28:33 +0000 (Wed, 25 Jan 2012) Log Message: ----------- Changes suggested by trial install of PVS-Studio and clang static analysis. Modified Paths: -------------- trunk/zoolib/source/cxx/old/zoolib/ZYad_ZooLibStrim.cpp trunk/zoolib/source/cxx/zoolib/ZAny.cpp trunk/zoolib/source/cxx/zoolib/ZCallable_Bind.h trunk/zoolib/source/cxx/zoolib/ZCompare.h trunk/zoolib/source/cxx/zoolib/ZFile_Win.cpp trunk/zoolib/source/cxx/zoolib/ZFunctionChain.h trunk/zoolib/source/cxx/zoolib/ZML.cpp trunk/zoolib/source/cxx/zoolib/ZNet_Local_Win.cpp trunk/zoolib/source/cxx/zoolib/ZNet_Socket.cpp trunk/zoolib/source/cxx/zoolib/ZPromise.h trunk/zoolib/source/cxx/zoolib/ZRef.h trunk/zoolib/source/cxx/zoolib/ZSafeSet.h trunk/zoolib/source/cxx/zoolib/ZStream.h trunk/zoolib/source/cxx/zoolib/ZStreamRW_FIFO.cpp trunk/zoolib/source/cxx/zoolib/ZStream_CRLF.cpp trunk/zoolib/source/cxx/zoolib/ZStrim.h trunk/zoolib/source/cxx/zoolib/ZStrim_CRLF.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Any.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Any.h trunk/zoolib/source/cxx/zoolib/ZUtil_CF_Context.h trunk/zoolib/source/cxx/zoolib/ZVisitor.cpp trunk/zoolib/source/cxx/zoolib/ZVisitor.h trunk/zoolib/source/cxx/zoolib/ZWorker.cpp Modified: trunk/zoolib/source/cxx/old/zoolib/ZYad_ZooLibStrim.cpp =================================================================== --- trunk/zoolib/source/cxx/old/zoolib/ZYad_ZooLibStrim.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/old/zoolib/ZYad_ZooLibStrim.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -165,7 +165,6 @@ else if (typeValueLC == "id") oVal = eZType_ID; else if (typeValueLC == "vector") oVal = eZType_Vector; else if (typeValueLC == "type") oVal = eZType_Type; - else if (typeValueLC == "time") oVal = eZType_Time; //## else if (typeValueLC == "name") oVal = eZType_Name; else spThrowParseException("Unknown type name '" + typeValue + "'"); Modified: trunk/zoolib/source/cxx/zoolib/ZAny.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZAny.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZAny.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -104,12 +104,12 @@ void ZAny::swap(ZAny& ioOther) { - // Simplify this for now if (fPtr_InPlace || ioOther.fPtr_InPlace) { - ZAny temp = *this; + // Trivial implementation for now + const ZAny temp = *this; *this = ioOther; - ioOther = *this; + ioOther = temp; } else { Modified: trunk/zoolib/source/cxx/zoolib/ZCallable_Bind.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCallable_Bind.h 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZCallable_Bind.h 2012-01-25 19:28:33 UTC (rev 2683) @@ -2644,8 +2644,6 @@ { if (not iCallable) return null; - if (not iCallable) - return null; return new Callable_L09<typename Callable::Signature> (i0, i1, i2, i3, i4, i5, i6, i7, i8, iCallable); Modified: trunk/zoolib/source/cxx/zoolib/ZCompare.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCompare.h 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZCompare.h 2012-01-25 19:28:33 UTC (rev 2683) @@ -35,7 +35,7 @@ { protected: ZCompare(const char* iTypeName); - ~ZCompare(); + virtual ~ZCompare(); virtual int Compare(const void* iL, const void* iR) = 0; Modified: trunk/zoolib/source/cxx/zoolib/ZFile_Win.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZFile_Win.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZFile_Win.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -543,13 +543,16 @@ while (bufSize < 16384) { vector<char> buffer(bufSize); - DWORD result = ::GetModuleFileNameA(::GetModuleHandleA(nullptr), &buffer[0], bufSize); - if (result < 0) + if (DWORD result = ::GetModuleFileNameA(::GetModuleHandleA(nullptr), &buffer[0], bufSize)) + { + if (result < bufSize) + return sFromFullWinPath(&buffer[0]); + bufSize *= 2; + } + else + { break; - if (result < bufSize) - return sFromFullWinPath(&buffer[0]); - - bufSize *= 2; + } } return null; @@ -1133,13 +1136,16 @@ while (bufSize < 16384) { vector<UTF16> buffer(bufSize); - DWORD result = ::GetModuleFileNameW(::GetModuleHandleW(nullptr), &buffer[0], bufSize); - if (result < 0) + if (DWORD result = ::GetModuleFileNameW(::GetModuleHandleW(nullptr), &buffer[0], bufSize)) + { + if (result < bufSize) + return sFromFullWinPath(&buffer[0]); + bufSize *= 2; + } + else + { break; - if (result < bufSize) - return sFromFullWinPath(&buffer[0]); - - bufSize *= 2; + } } return null; Modified: trunk/zoolib/source/cxx/zoolib/ZFunctionChain.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZFunctionChain.h 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZFunctionChain.h 2012-01-25 19:28:33 UTC (rev 2683) @@ -89,6 +89,9 @@ theHead = this; } + virtual ~ZFunctionChain_T() + {} + virtual bool Invoke(Result& oResult, Param iParam) { return false; } Modified: trunk/zoolib/source/cxx/zoolib/ZML.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZML.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZML.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -896,8 +896,7 @@ ZQ<UTF32> theEntityCPQ; const UTF8* current = localSource; const UTF8* priorToEntity; - while (not theEntityCPQ) - { + do { priorToEntity = current; UTF32 theCP; if (not ZUnicode::sReadInc(current, localSourceEnd, theCP)) @@ -928,7 +927,7 @@ theEntityCPQ = theCP; } } - } + } while (not theEntityCPQ); if (theEntityCPQ) { Modified: trunk/zoolib/source/cxx/zoolib/ZNet_Local_Win.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZNet_Local_Win.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZNet_Local_Win.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -207,19 +207,18 @@ ZRef<ZNetEndpoint> ZNetListener_Local_Win::Listen() { - bool success = ::ConnectNamedPipe(fHANDLE, &fOVERLAPPED); - -// DWORD err = ::GetLastError(); -// if (!success && (err == ERROR_IO_PENDING || err == ERROR_PIPE_LISTENING)) -// ::WaitForSingleObjectEx(fEvent, INFINITE, TRUE); - - DWORD dummy; - success = ::GetOverlappedResult(fHANDLE, &fOVERLAPPED, &dummy, TRUE); - - ZRef<HANDLE> theHANDLE; - theHANDLE.swap(fHANDLE); - fHANDLE = spCreateNamedPipe(fPath, false); - return new ZNetEndpoint_Local_Win(theHANDLE); + if (::ConnectNamedPipe(fHANDLE, &fOVERLAPPED)) + { + DWORD dummy; + if (::GetOverlappedResult(fHANDLE, &fOVERLAPPED, &dummy, TRUE)) + { + ZRef<HANDLE> theHANDLE; + theHANDLE.swap(fHANDLE); + fHANDLE = spCreateNamedPipe(fPath, false); + return new ZNetEndpoint_Local_Win(theHANDLE); + } + } + return null; } void ZNetListener_Local_Win::CancelListen() Modified: trunk/zoolib/source/cxx/zoolib/ZNet_Socket.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZNet_Socket.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZNet_Socket.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -316,30 +316,33 @@ void ZNetEndpoint_Socket::Imp_Read(void* oDest, size_t iCount, size_t* oCountRead) { char* localDest = static_cast<char*>(oDest); - while (iCount) + if (iCount) { - const int result = sReceive(fSocketFD, localDest, iCount); + for (;;) + { + const int result = sReceive(fSocketFD, localDest, iCount); - if (result < 0) - { - const int err = errno; - if (err == EAGAIN) - sWaitReadable(fSocketFD, 1000); - else if (err != EINTR) + if (result < 0) + { + const int err = errno; + if (err == EAGAIN) + sWaitReadable(fSocketFD, 1000); + else if (err != EINTR) + break; + } + else if (result == 0) + { + // result is zero, indicating that the other end has sent FIN. break; + } + else + { + localDest += result; + break; + } } - else if (result == 0) - { - // result is zero, indicating that the other end has sent FIN. - break; - } - else - { - localDest += result; - iCount -= result; - break; - } } + if (oCountRead) *oCountRead = localDest - static_cast<char*>(oDest); } Modified: trunk/zoolib/source/cxx/zoolib/ZPromise.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZPromise.h 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZPromise.h 2012-01-25 19:28:33 UTC (rev 2683) @@ -211,7 +211,7 @@ { return new ZPromise<T>; } // ================================================================================================= -// MARK: - sGetClear +// MARK: - sGetDeliveryClearPromise template <class T> ZRef<ZDelivery<T> > sGetDeliveryClearPromise(ZRef<ZPromise<T> >& ioPromise) Modified: trunk/zoolib/source/cxx/zoolib/ZRef.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZRef.h 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZRef.h 2012-01-25 19:28:33 UTC (rev 2683) @@ -206,18 +206,15 @@ return true; } - static T* sCFRetain(T* iP) + static T* sCFAllocatorRetain(T* iP) { if (iP) sRetain(*iP); return iP; } - static void sCFRelease(T* iP) - { - if (iP) - sRelease(*iP); - } + static void sCFAllocatorRelease(T* iP) + { spRelease(iP); } private: T* fP; @@ -402,18 +399,16 @@ return true; } - static T* sCFRetain(T* iP) + static T* sCFAllocatorRetain(T* iP) { if (iP) sRetain_T(iP); return iP; } - static T* sCFRelease(T* iP) - { - if (iP) - sRelease_T(iP); - } + static void sCFAllocatorRelease(T* iP) + { spRelease(iP); } + private: T* fP; }; Modified: trunk/zoolib/source/cxx/zoolib/ZSafeSet.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZSafeSet.h 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZSafeSet.h 2012-01-25 19:28:33 UTC (rev 2683) @@ -126,7 +126,7 @@ return fList.size(); } - bool pEmpty() const + bool pIsEmpty() const { ZAcqMtx acq(fMtx); return fList.empty(); @@ -247,8 +247,8 @@ size_t Size() const { return fRep->pSize(); } - bool Empty() const - { return fRep->pEmpty(); } + bool IsEmpty() const + { return fRep->pIsEmpty(); } bool Insert(const T& iT) { return fRep->pInsert(iT); } Modified: trunk/zoolib/source/cxx/zoolib/ZStream.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZStream.h 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZStream.h 2012-01-25 19:28:33 UTC (rev 2683) @@ -96,7 +96,7 @@ ZStreamR reference, you must work with some derived class. */ //@{ ZStreamR() {} - ~ZStreamR() {} + virtual ~ZStreamR() {} ZStreamR(const ZStreamR&) {} ZStreamR& operator=(const ZStreamR&) { return *this; } //@} @@ -356,7 +356,7 @@ ZStreamW reference, you must work with some derived class. */ //@{ ZStreamW() {} - ~ZStreamW() {} + virtual ~ZStreamW() {} ZStreamW(const ZStreamW&) {} ZStreamW& operator=(const ZStreamW&) { return *this; } //@} Modified: trunk/zoolib/source/cxx/zoolib/ZStreamRW_FIFO.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZStreamRW_FIFO.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZStreamRW_FIFO.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -57,24 +57,26 @@ ZAcqMtx acq(fMutex); ++fUserCount; uint8* localDest = static_cast<uint8*>(oDest); - while (iCount) + if (iCount) { - const size_t countToCopy = min(iCount, fBuffer.size()); - if (countToCopy == 0) + for (;;) { - if (fClosed) + const size_t countToCopy = min(iCount, fBuffer.size()); + if (countToCopy == 0) + { + if (fClosed) + break; + fCondition_Read.Wait(fMutex); + } + else + { + copy(fBuffer.begin(), fBuffer.begin() + countToCopy, localDest); + fBuffer.erase(fBuffer.begin(), fBuffer.begin() + countToCopy); + localDest += countToCopy; + fCondition_Write.Broadcast(); break; - fCondition_Read.Wait(fMutex); + } } - else - { - copy(fBuffer.begin(), fBuffer.begin() + countToCopy, localDest); - fBuffer.erase(fBuffer.begin(), fBuffer.begin() + countToCopy); - localDest += countToCopy; - iCount -= countToCopy; - fCondition_Write.Broadcast(); - break; - } } if (oCountRead) *oCountRead = localDest - static_cast<uint8*>(oDest); Modified: trunk/zoolib/source/cxx/zoolib/ZStream_CRLF.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZStream_CRLF.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZStream_CRLF.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -248,10 +248,7 @@ size_t countWritten; fStreamSink.Write(localSource, innerSource - localSource, &countWritten); if (countWritten == 0) - { - countRemaining = 0; break; - } if (oCountWritten) *oCountWritten += countWritten; countRemaining -= countWritten; Modified: trunk/zoolib/source/cxx/zoolib/ZStrim.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZStrim.h 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZStrim.h 2012-01-25 19:28:33 UTC (rev 2683) @@ -63,7 +63,7 @@ ZStrimR reference, you must work with some derived class. */ //@{ ZStrimR() {} - ~ZStrimR() {} + virtual ~ZStrimR() {} ZStrimR(const ZStrimR&) {} ZStrimR& operator=(const ZStrimR&) { return *this; } //@} @@ -196,7 +196,7 @@ ZStrimW reference, you must work with some derived class. */ //@{ ZStrimW() {} - ~ZStrimW() {} + virtual ~ZStrimW() {} ZStrimW(const ZStrimW&) {} ZStrimW& operator=(const ZStrimW&) { return *this; } //@} Modified: trunk/zoolib/source/cxx/zoolib/ZStrim_CRLF.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZStrim_CRLF.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZStrim_CRLF.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -161,10 +161,7 @@ size_t countWritten; fStrimSink.Write(localSource, innerSource - localSource, &countWritten); if (countWritten == 0) - { - iCountCU = 0; break; - } iCountCU -= countWritten; localSource += countWritten; fLastWasCR = false; Modified: trunk/zoolib/source/cxx/zoolib/ZUtil_Any.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZUtil_Any.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZUtil_Any.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -175,40 +175,4 @@ return 0.0; } -ZQ<double> sQCoerceReal(const ZAny& iAny) - { - if (false) - {} - else if (const float* theVal = iAny.PGet<float>()) - return *theVal; - else if (const double* theVal = iAny.PGet<double>()) - return *theVal; - - return null; - } - -bool sQCoerceReal(const ZAny& iAny, double& oVal) - { - if (ZQ<double> qDouble = sQCoerceReal(iAny)) - { - oVal = qDouble.Get(); - return true; - } - return false; - } - -double sDCoerceReal(double iDefault, const ZAny& iAny) - { - if (ZQ<double> qDouble = sQCoerceReal(iAny)) - return qDouble.Get(); - return iDefault; - } - -double sCoerceReal(const ZAny& iAny) - { - if (ZQ<double> qDouble = sQCoerceReal(iAny)) - return qDouble.Get(); - return 0.0; - } - } // namespace ZooLib Modified: trunk/zoolib/source/cxx/zoolib/ZUtil_Any.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZUtil_Any.h 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZUtil_Any.h 2012-01-25 19:28:33 UTC (rev 2683) @@ -46,11 +46,18 @@ double sCoerceRat(const ZAny& iAny); // Old names -ZQ<double> sQCoerceReal(const ZAny& iAny); -bool sQCoerceReal(const ZAny& iAny, double& oVal); -double sDCoerceReal(double iDefault, const ZAny& iAny); -double sCoerceReal(const ZAny& iAny); +inline ZQ<double> sQCoerceReal(const ZAny& iAny) + { return sQCoerceRat(iAny); } +inline bool sQCoerceReal(const ZAny& iAny, double& oVal) + { return sQCoerceRat(iAny, oVal); } + +inline double sDCoerceReal(double iDefault, const ZAny& iAny) + { return sDCoerceRat(iDefault, iAny); } + +inline double sCoerceReal(const ZAny& iAny) + { return sCoerceRat(iAny); } + } // namespace ZooLib #endif // __ZUtil_Any_h__ Modified: trunk/zoolib/source/cxx/zoolib/ZUtil_CF_Context.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZUtil_CF_Context.h 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZUtil_CF_Context.h 2012-01-25 19:28:33 UTC (rev 2683) @@ -72,8 +72,8 @@ : fT(T()) { fT.info = iRef.Get(); - fT.retain = (CFAllocatorRetainCallBack)&ZRef<O>::sCFRetain; - fT.release = (CFAllocatorReleaseCallBack)&ZRef<O>::sCFRelease; + fT.retain = (CFAllocatorRetainCallBack)&ZRef<O>::sCFAllocatorRetain; + fT.release = (CFAllocatorReleaseCallBack)&ZRef<O>::sCFAllocatorRelease; fT.retain(fT.info); } Modified: trunk/zoolib/source/cxx/zoolib/ZVisitor.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZVisitor.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZVisitor.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -31,6 +31,9 @@ // ================================================================================================= // MARK: - ZVisitor +ZVisitor::~ZVisitor() + {} + void ZVisitor::Visit(const ZRef<ZVisitee>& iRep) {} Modified: trunk/zoolib/source/cxx/zoolib/ZVisitor.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZVisitor.h 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZVisitor.h 2012-01-25 19:28:33 UTC (rev 2683) @@ -44,6 +44,7 @@ class ZVisitor { public: + virtual ~ZVisitor(); virtual void Visit(const ZRef<ZVisitee>& iRep); }; Modified: trunk/zoolib/source/cxx/zoolib/ZWorker.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZWorker.cpp 2012-01-25 19:26:51 UTC (rev 2682) +++ trunk/zoolib/source/cxx/zoolib/ZWorker.cpp 2012-01-25 19:28:33 UTC (rev 2683) @@ -160,7 +160,7 @@ bool ZWorker::Attach(ZRef<ZCaller> iCaller) { ZGuardRMtx guard(fMtx); - if (!fCaller) + if (not fCaller) { fCaller = iCaller; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-25 19:26:57
|
Revision: 2682 http://zoolib.svn.sourceforge.net/zoolib/?rev=2682&view=rev Author: agreen Date: 2012-01-25 19:26:51 +0000 (Wed, 25 Jan 2012) Log Message: ----------- Make the underlying set accessible to clients, so its API can be used directly rather than having to forward everything. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCallable_Set.h Modified: trunk/zoolib/source/cxx/zoolib/ZCallable_Set.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCallable_Set.h 2012-01-23 18:18:12 UTC (rev 2681) +++ trunk/zoolib/source/cxx/zoolib/ZCallable_Set.h 2012-01-25 19:26:51 UTC (rev 2682) @@ -55,12 +55,9 @@ } // Our protocol - void Insert(ZRef<Callable> iCallable) - { fCallables.Insert(iCallable); } + ZSafeSet<ZRef<Callable> >& GetCallables() + { return fCallables; } - void Erase(ZRef<Callable> iCallable) - { fCallables.Erase(iCallable); } - private: ZSafeSet<ZRef<Callable> > fCallables; }; @@ -88,12 +85,9 @@ } // Our protocol - void Insert(ZRef<Callable> iCallable) - { fCallables.Insert(iCallable); } + ZSafeSet<ZRef<Callable> >& GetCallables() + { return fCallables; } - void Erase(ZRef<Callable> iCallable) - { fCallables.Erase(iCallable); } - private: ZSafeSet<ZRef<Callable> > fCallables; }; @@ -121,12 +115,9 @@ } // Our protocol - void Insert(ZRef<Callable> iCallable) - { fCallables.Insert(iCallable); } + ZSafeSet<ZRef<Callable> >& GetCallables() + { return fCallables; } - void Erase(ZRef<Callable> iCallable) - { fCallables.Erase(iCallable); } - private: ZSafeSet<ZRef<Callable> > fCallables; }; @@ -154,12 +145,9 @@ } // Our protocol - void Insert(ZRef<Callable> iCallable) - { fCallables.Insert(iCallable); } + ZSafeSet<ZRef<Callable> >& GetCallables() + { return fCallables; } - void Erase(ZRef<Callable> iCallable) - { fCallables.Erase(iCallable); } - private: ZSafeSet<ZRef<Callable> > fCallables; }; @@ -187,12 +175,9 @@ } // Our protocol - void Insert(ZRef<Callable> iCallable) - { fCallables.Insert(iCallable); } + ZSafeSet<ZRef<Callable> >& GetCallables() + { return fCallables; } - void Erase(ZRef<Callable> iCallable) - { fCallables.Erase(iCallable); } - private: ZSafeSet<ZRef<Callable> > fCallables; }; @@ -220,12 +205,9 @@ } // Our protocol - void Insert(ZRef<Callable> iCallable) - { fCallables.Insert(iCallable); } + ZSafeSet<ZRef<Callable> >& GetCallables() + { return fCallables; } - void Erase(ZRef<Callable> iCallable) - { fCallables.Erase(iCallable); } - private: ZSafeSet<ZRef<Callable> > fCallables; }; @@ -253,12 +235,9 @@ } // Our protocol - void Insert(ZRef<Callable> iCallable) - { fCallables.Insert(iCallable); } + ZSafeSet<ZRef<Callable> >& GetCallables() + { return fCallables; } - void Erase(ZRef<Callable> iCallable) - { fCallables.Erase(iCallable); } - private: ZSafeSet<ZRef<Callable> > fCallables; }; @@ -285,6 +264,10 @@ } } +// Our protocol + ZSafeSet<ZRef<Callable> >& GetCallables() + { return fCallables; } + private: ZSafeSet<ZRef<Callable> > fCallables; }; @@ -312,12 +295,9 @@ } // Our protocol - void Insert(ZRef<Callable> iCallable) - { fCallables.Insert(iCallable); } + ZSafeSet<ZRef<Callable> >& GetCallables() + { return fCallables; } - void Erase(ZRef<Callable> iCallable) - { fCallables.Erase(iCallable); } - private: ZSafeSet<ZRef<Callable> > fCallables; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-23 18:18:22
|
Revision: 2681 http://zoolib.svn.sourceforge.net/zoolib/?rev=2681&view=rev Author: agreen Date: 2012-01-23 18:18:12 +0000 (Mon, 23 Jan 2012) Log Message: ----------- Method name change GetData-->GetPtr. It had become confusing to me that the type has Data in its name, and yet an element of that type was accessed using that same name. Not overly in love with Ptr, but it is accurate and distinct from the type name now. Modified Paths: -------------- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.cpp trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Std.cpp trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp trunk/zoolib/source/cxx/old/zoolib/ZVal_ZooLib.cpp trunk/zoolib/source/cxx/zoolib/ZData_Any.cpp trunk/zoolib/source/cxx/zoolib/ZData_Any.h trunk/zoolib/source/cxx/zoolib/ZData_CF.cpp trunk/zoolib/source/cxx/zoolib/ZData_CF.h trunk/zoolib/source/cxx/zoolib/ZData_NS.h trunk/zoolib/source/cxx/zoolib/ZData_NS.mm trunk/zoolib/source/cxx/zoolib/ZNatter.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_CF.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_NS.mm trunk/zoolib/source/cxx/zoolib/ZYad_AppleEvent.cpp Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -379,7 +379,7 @@ ZBlackBerry::Data theMB = theQ.Get(); w.WriteBool(true); w.WriteCount(theMB.GetSize()); - w.Write(theMB.GetData(), theMB.GetSize()); + w.Write(theMB.GetPtr(), theMB.GetSize()); return; } } Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -235,7 +235,7 @@ if (r.ReadBool()) { Data theMB(r.ReadCount()); - r.Read(theMB.GetDataMutable(), theMB.GetSize()); + r.Read(theMB.GetPtrMutable(), theMB.GetSize()); return theMB; } } Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -755,7 +755,7 @@ { Data theMB_PIN = this->GetAttribute(8, 4); if (theMB_PIN.GetSize() >= 15) - return ZByteSwap_ReadLittle32(static_cast<const char*>(theMB_PIN.GetData()) + 11); + return ZByteSwap_ReadLittle32(static_cast<const char*>(theMB_PIN.GetPtr()) + 11); return 0; } @@ -1062,7 +1062,7 @@ // We've already read one byte (containing the command); Data theMB(iPayloadSize - 1); - iStreamR.Read(theMB.GetDataMutable(), theMB.GetSize()); + iStreamR.Read(theMB.GetPtrMutable(), theMB.GetSize()); ZGuardRMtxR locker(fMutex); ZAssert(fGetAttribute); Modified: trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -69,7 +69,7 @@ static const ZStrimW& operator<<(const ZStrimW& w, const Daton& iDaton) { const ZData_Any& theData = iDaton.GetData(); - w.Write(static_cast<const UTF8*>(theData.GetData()), theData.GetSize()); + w.Write(static_cast<const UTF8*>(theData.GetPtr()), theData.GetSize()); return w; } Modified: trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -120,7 +120,7 @@ { return sAsVal(ZStreamRPos_Memory(iSource, iSize)); } ZQ<ZVal_Any> sAsVal(const ZData_Any& iData) - { return sAsVal(iData.GetData(), iData.GetSize()); } + { return sAsVal(iData.GetPtr(), iData.GetSize()); } } // namespace QuickTime } // namespace FileFormat Modified: trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.h 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.h 2012-01-23 18:18:12 UTC (rev 2681) @@ -41,7 +41,6 @@ ZQ<ZVal_Any> sAsVal(const ZData_Any& iData); ZQ<ZVal_Any> sAsVal(const ZStreamR& iStreamR); - } // namespace QuickTime } // namespace FileFormat } // namespace ZooLib Modified: trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Std.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Std.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Std.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -650,7 +650,7 @@ fNPStream.lastmodified = 0; fNPStream.notifyData = iNotifyData; fNPStream.headers = nullptr; -// fNPStream.headers = static_cast<const char*>(fHeaders.GetData()); +// fNPStream.headers = static_cast<const char*>(fHeaders.GetPtr()); } Host_Std::Sender::~Sender() Modified: trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -151,9 +151,9 @@ { \ Data theVal(theLength); \ if (0 == theLength \ - || noErr == SUITE->GetData(iSource, iKey, theVal.GetDataMutable())) \ + || noErr == SUITE->GetData(iSource, iKey, theVal.GetPtrMutable())) \ { \ - SUITE->PutData(DEST, theVal.GetSize(), theVal.GetDataMutable()); \ + SUITE->PutData(DEST, theVal.GetSize(), theVal.GetPtrMutable()); \ } \ } \ break; \ @@ -250,7 +250,7 @@ if (noErr == SUITE->GetDataLength(P0, P1, &theLength)) \ { \ Data result(theLength); \ - if (0 == theLength || noErr == SUITE->GetData(P0, P1, result.GetDataMutable())) \ + if (0 == theLength || noErr == SUITE->GetData(P0, P1, result.GetPtrMutable())) \ return result; \ } \ break; \ @@ -287,7 +287,7 @@ else if (const FileRef* theVal = iVal.PGet<FileRef>()) \ { SUITE->PutAlias(PARAM, theVal->Get()); } \ else if (const Data* theVal = iVal.PGet<Data>()) \ - { SUITE->PutData(PARAM, theVal->GetSize(), const_cast<void*>(theVal->GetData())); } + { SUITE->PutData(PARAM, theVal->GetSize(), const_cast<void*>(theVal->GetPtr())); } // ================================================================================================= // MARK: - ZPhotoshop suites, for local use Modified: trunk/zoolib/source/cxx/old/zoolib/ZVal_ZooLib.cpp =================================================================== --- trunk/zoolib/source/cxx/old/zoolib/ZVal_ZooLib.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/old/zoolib/ZVal_ZooLib.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -1246,7 +1246,7 @@ const ZData_ZooLib* theMemoryBlock = sFetch_T<ZData_ZooLib>(fType.fBytes); iStreamW.WriteCount(theMemoryBlock->GetSize()); if (theMemoryBlock->GetSize()) - iStreamW.Write(theMemoryBlock->GetData(), theMemoryBlock->GetSize()); + iStreamW.Write(theMemoryBlock->GetPtr(), theMemoryBlock->GetSize()); break; } case eZType_Vector: @@ -1712,7 +1712,7 @@ { try { - iStreamR.Read(theRaw->GetDataMutable(), size); + iStreamR.Read(theRaw->GetPtrMutable(), size); } catch (...) { Modified: trunk/zoolib/source/cxx/zoolib/ZData_Any.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_Any.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_Any.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -140,10 +140,10 @@ } } -const void* ZData_Any::GetData() const +const void* ZData_Any::GetPtr() const { return ZUtil_STL::sFirstOrNil(fRep->fVector); } -void* ZData_Any::GetDataMutable() +void* ZData_Any::GetPtrMutable() { this->pTouch(); return ZUtil_STL::sFirstOrNil(fRep->fVector); Modified: trunk/zoolib/source/cxx/zoolib/ZData_Any.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_Any.h 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_Any.h 2012-01-23 18:18:12 UTC (rev 2681) @@ -53,8 +53,8 @@ size_t GetSize() const; void SetSize(size_t iSize); - const void* GetData() const; - void* GetDataMutable(); + const void* GetPtr() const; + void* GetPtrMutable(); void CopyFrom(size_t iOffset, const void* iSource, size_t iCount); void CopyFrom(const void* iSource, size_t iCount); Modified: trunk/zoolib/source/cxx/zoolib/ZData_CF.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_CF.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_CF.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -127,14 +127,14 @@ ::CFDataSetLength(this->pTouch(), iSize); } -const void* ZData_CF::GetData() const +const void* ZData_CF::GetPtr() const { if (CFDataRef theData = this->pData()) return ::CFDataGetBytePtr(theData); return nullptr; } -void* ZData_CF::GetDataMutable() +void* ZData_CF::GetPtrMutable() { return ::CFDataGetMutableBytePtr(this->pTouch()); } void ZData_CF::CopyFrom(size_t iOffset, const void* iSource, size_t iCount) Modified: trunk/zoolib/source/cxx/zoolib/ZData_CF.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_CF.h 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_CF.h 2012-01-23 18:18:12 UTC (rev 2681) @@ -66,8 +66,8 @@ size_t GetSize() const; void SetSize(size_t iSize); - const void* GetData() const; - void* GetDataMutable(); + const void* GetPtr() const; + void* GetPtrMutable(); void CopyFrom(size_t iOffset, const void* iSource, size_t iCount); void CopyFrom(const void* iSource, size_t iCount); Modified: trunk/zoolib/source/cxx/zoolib/ZData_NS.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_NS.h 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_NS.h 2012-01-23 18:18:12 UTC (rev 2681) @@ -68,8 +68,8 @@ size_t GetSize() const; void SetSize(size_t iSize); - const void* GetData() const; - void* GetDataMutable(); + const void* GetPtr() const; + void* GetPtrMutable(); void CopyFrom(size_t iOffset, const void* iSource, size_t iCount); void CopyFrom(const void* iSource, size_t iCount); Modified: trunk/zoolib/source/cxx/zoolib/ZData_NS.mm =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_NS.mm 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_NS.mm 2012-01-23 18:18:12 UTC (rev 2681) @@ -123,14 +123,14 @@ [this->pTouch() setLength:iSize]; } -const void* ZData_NS::GetData() const +const void* ZData_NS::GetPtr() const { if (NSData* theData = this->pData()) return [theData bytes]; return nullptr; } -void* ZData_NS::GetDataMutable() +void* ZData_NS::GetPtrMutable() { return [this->pTouch() mutableBytes]; } void ZData_NS::CopyFrom(size_t iOffset, const void* iSource, size_t iCount) Modified: trunk/zoolib/source/cxx/zoolib/ZNatter.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZNatter.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZNatter.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -160,7 +160,7 @@ w.WriteUInt8(2); w.WriteInt64(iExchange->fID ^ 1); w.WriteCount(iData.GetSize()); - w.Write(iData.GetData(), iData.GetSize()); + w.Write(iData.GetPtr(), iData.GetSize()); w.Flush(); } catch (...) Modified: trunk/zoolib/source/cxx/zoolib/ZUtil_CF.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZUtil_CF.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZUtil_CF.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -329,7 +329,7 @@ else if (const ZData_Any* theValue = iVal.PGet<ZData_Any>()) { if (size_t theSize = theValue->GetSize()) - return sData(theValue->GetData(), theSize); + return sData(theValue->GetPtr(), theSize); else return sData(); } Modified: trunk/zoolib/source/cxx/zoolib/ZUtil_NS.mm =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZUtil_NS.mm 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZUtil_NS.mm 2012-01-23 18:18:12 UTC (rev 2681) @@ -170,7 +170,7 @@ else if (const ZData_Any* theValue = iVal.PGet<ZData_Any>()) { if (size_t theSize = theValue->GetSize()) - return sData(theValue->GetData(), theSize); + return sData(theValue->GetPtr(), theSize); else return sData(); } Modified: trunk/zoolib/source/cxx/zoolib/ZYad_AppleEvent.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZYad_AppleEvent.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZYad_AppleEvent.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -38,7 +38,7 @@ const size_t theSize = ::AEGetDescDataSize(&iAEDesc); ZData_Any theData(theSize); - ::AEGetDescData(&iAEDesc, theData.GetDataMutable(), theSize); + ::AEGetDescData(&iAEDesc, theData.GetPtrMutable(), theSize); theMap.Set("Value", theData); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <ag...@us...> - 2012-01-19 22:37:19
|
Revision: 2679 http://zoolib.svn.sourceforge.net/zoolib/?rev=2679&view=rev Author: agreen Date: 2012-01-19 22:37:13 +0000 (Thu, 19 Jan 2012) Log Message: ----------- Use QDo. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Op_Do_Transform_T.h Modified: trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Op_Do_Transform_T.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Op_Do_Transform_T.h 2012-01-16 20:09:34 UTC (rev 2678) +++ trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Op_Do_Transform_T.h 2012-01-19 22:37:13 UTC (rev 2679) @@ -49,16 +49,18 @@ // From ZVisitor_Expr_Op1_T virtual void Visit_Expr_Op1(const ZRef<ZExpr_Op1_T<T> >& iExpr) { - ZRef<T> newOp0 = this->Do(iExpr->GetOp0()); - this->pSetResult(iExpr->SelfOrClone(newOp0)); + if (ZQ<ZRef<T> > theQ0 = this->QDo(iExpr->GetOp0())) + this->pSetResult(iExpr->SelfOrClone(*theQ0)); } // From ZVisitor_Expr_Op2_T virtual void Visit_Expr_Op2(const ZRef<ZExpr_Op2_T<T> >& iExpr) { - ZRef<T> newOp0 = this->Do(iExpr->GetOp0()); - ZRef<T> newOp1 = this->Do(iExpr->GetOp1()); - this->pSetResult(iExpr->SelfOrClone(newOp0, newOp1)); + if (ZQ<ZRef<T> > theQ0 = this->QDo(iExpr->GetOp0())) + { + if (ZQ<ZRef<T> > theQ1 = this->QDo(iExpr->GetOp1())) + this->pSetResult(iExpr->SelfOrClone(*theQ0, *theQ1)); + } } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-16 20:09:40
|
Revision: 2678 http://zoolib.svn.sourceforge.net/zoolib/?rev=2678&view=rev Author: agreen Date: 2012-01-16 20:09:34 +0000 (Mon, 16 Jan 2012) Log Message: ----------- Comments. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZUnicode.cpp trunk/zoolib/source/cxx/zoolib/ZUnicode.h Modified: trunk/zoolib/source/cxx/zoolib/ZUnicode.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZUnicode.cpp 2012-01-16 15:43:07 UTC (rev 2677) +++ trunk/zoolib/source/cxx/zoolib/ZUnicode.cpp 2012-01-16 20:09:34 UTC (rev 2678) @@ -291,18 +291,33 @@ const uint8 sUTF8SequenceLength[256] = { - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // Standalone - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // Standalone - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // Standalone - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // Standalone - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // Continuation - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // Continuation - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, // Start, 2 byte - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, // Start, 3 byte - 4,4,4,4,4,4,4,4, // Start, 4 byte - 5,5,5,5, // Start, 5 byte - 6,6, // Start, 6 byte - 0,0 // 0xFE and 0xFF are illegal UTF8 code units. + // Standalone + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + + // Continuation + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + + // Start, 2 byte + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + + // Start, 3 byte + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + + // Start, 4 byte + 4,4,4,4,4,4,4,4, + + // Start, 5 byte + 5,5,5,5, + + // Start, 6 byte + 6,6, + + // 0xFE and 0xFF are illegal UTF8 code units. + 0,0 }; // These arrays are indexed by sequence length. So the element 0 is never Modified: trunk/zoolib/source/cxx/zoolib/ZUnicode.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZUnicode.h 2012-01-16 15:43:07 UTC (rev 2677) +++ trunk/zoolib/source/cxx/zoolib/ZUnicode.h 2012-01-16 20:09:34 UTC (rev 2678) @@ -113,7 +113,7 @@ /* These are all template functions, they'll take anything that behaves like a string::iterator or a pointer. They call through to static member functions of template structs declared in -ZUnicodePriv.h.The actual code for the three different code unit types is in ZUnicodePrivB.h, +ZUnicodePriv.h. The actual code for the three different code unit types is in ZUnicodePrivB.h, and we do explicit template instantiations of the structs in ZUnicode.cpp. So if you have a new kind of iterator you'll need to do something similar in your code. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-16 15:43:13
|
Revision: 2677 http://zoolib.svn.sourceforge.net/zoolib/?rev=2677&view=rev Author: agreen Date: 2012-01-16 15:43:07 +0000 (Mon, 16 Jan 2012) Log Message: ----------- More MARK comments. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h trunk/zoolib/source/cxx/zoolib/ZNet.h trunk/zoolib/source/cxx/zoolib/ZRef.h trunk/zoolib/source/cxx/zoolib/ZTypes.cpp Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-15 05:07:51 UTC (rev 2676) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-16 15:43:07 UTC (rev 2677) @@ -167,7 +167,7 @@ { return iCallable && not sIsTrue(iCallable); } // ================================================================================================= -// MARK: - sCallCog variants +// MARK:- sCallCog variants template <class Cog> Cog sCallCog(const Cog& iCog, const typename Cog::Param iParam) Modified: trunk/zoolib/source/cxx/zoolib/ZNet.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZNet.h 2012-01-15 05:07:51 UTC (rev 2676) +++ trunk/zoolib/source/cxx/zoolib/ZNet.h 2012-01-16 15:43:07 UTC (rev 2677) @@ -38,21 +38,22 @@ // ================================================================================================= // MARK: - ZNet -namespace ZNet +namespace ZNet { + +enum Error { - enum Error - { - errorNone, - errorGeneric, - errorBadState, + errorNone, + errorGeneric, + errorBadState, - errorCouldntConnect, - errorLocalPortInUse, - errorCantGetAmountUnread, - errorBufferTooSmall - }; - } + errorCouldntConnect, + errorLocalPortInUse, + errorCantGetAmountUnread, + errorBufferTooSmall + }; +} // namespace ZNet + // ================================================================================================= // MARK: - ZNetEx Modified: trunk/zoolib/source/cxx/zoolib/ZRef.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZRef.h 2012-01-15 05:07:51 UTC (rev 2676) +++ trunk/zoolib/source/cxx/zoolib/ZRef.h 2012-01-16 15:43:07 UTC (rev 2677) @@ -442,8 +442,7 @@ } sTempRef = {}; // ================================================================================================= -#pragma mark - -#pragma mark * +// MARK: - template <class T> void swap(ZRef<T>& a, ZRef<T>& b) Modified: trunk/zoolib/source/cxx/zoolib/ZTypes.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZTypes.cpp 2012-01-15 05:07:51 UTC (rev 2676) +++ trunk/zoolib/source/cxx/zoolib/ZTypes.cpp 2012-01-16 15:43:07 UTC (rev 2677) @@ -23,8 +23,7 @@ namespace ZooLib { // ================================================================================================= -#pragma mark - -#pragma mark * +// MARK: - char sGarbageBuffer[4096]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-15 05:08:06
|
Revision: 2676 http://zoolib.svn.sourceforge.net/zoolib/?rev=2676&view=rev Author: agreen Date: 2012-01-15 05:07:51 +0000 (Sun, 15 Jan 2012) Log Message: ----------- OK. I'll be moving to Lion soon, at which point CodeWarrior becomes archaic. For some reason "#pragma mark" never propogated out of the Mac world. I just discovered that "// MARK:" has the same effect in XCode, and a "// XCode: -" prefix puts a divider into the function popup. I'm not on XCode 4 yeat, but will be soon enough. Modified Paths: -------------- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry.h trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryCOM.h trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.h trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_BBDevMgr.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_BBDevMgr.h trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.h trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_OSXUSB.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_OSXUSB.h trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.h trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Union.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Union.h trunk/zoolib/source/cxx/more/zoolib/blackberry/ZUtil_BlackBerry.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZUtil_BlackBerry.h trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Dataspace.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Dataspace.h trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source.h trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_SourceMUX.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_SourceMUX.h trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_SourceServer.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_SourceServer.h trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_Asyncify.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_Asyncify.h trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_Client.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_Client.h trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.h trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_SQLite.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_SQLite.h trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_Union.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_Union.h trunk/zoolib/source/cxx/more/zoolib/datonset/ZDatonSet.cpp trunk/zoolib/source/cxx/more/zoolib/datonset/ZDatonSet.h trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_AppleDouble.cpp trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_AppleDouble.h trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_IFF.cpp trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_IFF.h trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_JPEG.cpp trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_JPEG.h trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime.cpp trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime.h trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.cpp trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.h trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Yad.cpp trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Yad.h trunk/zoolib/source/cxx/more/zoolib/gameengine/ZGameEngine.cpp trunk/zoolib/source/cxx/more/zoolib/gameengine/ZGameEngine.h trunk/zoolib/source/cxx/more/zoolib/gameengine/ZGameEngine_Geometry.h trunk/zoolib/source/cxx/more/zoolib/gameengine/ZGameEngine_Tweens.h trunk/zoolib/source/cxx/more/zoolib/javascriptcore/ZJavaScriptCore.cpp trunk/zoolib/source/cxx/more/zoolib/javascriptcore/ZJavaScriptCore.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZCompat_npapi.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape.cpp trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_API.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Guest.cpp trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Guest.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_GuestFactory.cpp trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_GuestFactory.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Guest_Std.cpp trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Guest_Std.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host.cpp trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Cocoa.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Cocoa.mm trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Mac.cpp trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Mac.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Std.cpp trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Std.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Win.cpp trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Win.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Object.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_ObjectPriv.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Variant.cpp trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Variant.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_VariantPriv.h trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop.cpp trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_FileRef.cpp trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_FileRef.h trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Util.cpp trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Util.h trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.h trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Yad.cpp trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Yad.h trunk/zoolib/source/cxx/more/zoolib/sqlite/ZSQLite.cpp trunk/zoolib/source/cxx/more/zoolib/sqlite/ZSQLite.h trunk/zoolib/source/cxx/more/zoolib/sqlite/ZSQLite_YadSeqR_Iter.cpp trunk/zoolib/source/cxx/more/zoolib/sqlite/ZSQLite_YadSeqR_Iter.h trunk/zoolib/source/cxx/more/zoolib/uikit/UITVController_WithSections.h trunk/zoolib/source/cxx/more/zoolib/uikit/UITVController_WithSections.mm trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_DoQuery.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_DoQuery.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Expr_Rel_Search.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Expr_Rel_Search.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Result.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Result.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Transform_Search.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Transform_Search.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Visitor_DoMakeWalker.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Visitor_DoMakeWalker.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Calc.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Calc.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Const.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Const.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Dee.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Dee.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Dum.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Dum.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Embed.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Embed.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Product.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Product.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Project.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Project.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Rename.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Rename.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Restrict.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Restrict.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Result.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Result.h trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Union.cpp trunk/zoolib/source/cxx/more/zoolib/zqe/ZQE_Walker_Union.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_AsSQL.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Calc.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Calc.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Concrete.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Concrete.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Const.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Const.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Dee.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Dee.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Difference.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Difference.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Dum.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Dum.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Embed.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Embed.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Intersect.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Intersect.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Product.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Product.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Project.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Project.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Rename.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Rename.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Restrict.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Restrict.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Union.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Expr_Rel_Union.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_GetRelHead.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_GetRelHead.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_RelHead.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_RelHead.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_RelName.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Transform_ConsolidateRenames.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Transform_ConsolidateRenames.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Transform_DecomposeRestricts.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Transform_DecomposeRestricts.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Transform_PushDownRestricts.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Transform_PushDownRestricts.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Util.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Util.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Util_Strim_Rel.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Util_Strim_Rel.h trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Util_Strim_RelHead.cpp trunk/zoolib/source/cxx/more/zoolib/zra/ZRA_Util_Strim_RelHead.h trunk/zoolib/source/cxx/old/zoolib/ZASCompiler.cpp trunk/zoolib/source/cxx/old/zoolib/ZASCompiler.h trunk/zoolib/source/cxx/old/zoolib/ZASParser.cpp trunk/zoolib/source/cxx/old/zoolib/ZASParser.h trunk/zoolib/source/cxx/old/zoolib/ZAsset.cpp trunk/zoolib/source/cxx/old/zoolib/ZAsset.h trunk/zoolib/source/cxx/old/zoolib/ZAsset_FS.cpp trunk/zoolib/source/cxx/old/zoolib/ZAsset_FS.h trunk/zoolib/source/cxx/old/zoolib/ZAsset_MacOS.cpp trunk/zoolib/source/cxx/old/zoolib/ZAsset_MacOS.h trunk/zoolib/source/cxx/old/zoolib/ZAsset_POSIX.cpp trunk/zoolib/source/cxx/old/zoolib/ZAsset_POSIX.h trunk/zoolib/source/cxx/old/zoolib/ZAsset_Std.cpp trunk/zoolib/source/cxx/old/zoolib/ZAsset_Std.h trunk/zoolib/source/cxx/old/zoolib/ZAsset_Win.cpp trunk/zoolib/source/cxx/old/zoolib/ZAsset_Win.h trunk/zoolib/source/cxx/old/zoolib/ZDC.cpp trunk/zoolib/source/cxx/old/zoolib/ZDC.h trunk/zoolib/source/cxx/old/zoolib/ZDCGlyphServer.cpp trunk/zoolib/source/cxx/old/zoolib/ZDCGlyphServer.h trunk/zoolib/source/cxx/old/zoolib/ZDCGlyphServer_Asset.cpp trunk/zoolib/source/cxx/old/zoolib/ZDCGlyphServer_Asset.h trunk/zoolib/source/cxx/old/zoolib/ZDCInk.cpp trunk/zoolib/source/cxx/old/zoolib/ZDCInk.h trunk/zoolib/source/cxx/old/zoolib/ZDCPixmapCombo.cpp trunk/zoolib/source/cxx/old/zoolib/ZDCPixmapCombo.h trunk/zoolib/source/cxx/old/zoolib/ZDCPixmap_Asset_BMP.cpp trunk/zoolib/source/cxx/old/zoolib/ZDCPoly.cpp trunk/zoolib/source/cxx/old/zoolib/ZDCPoly.h trunk/zoolib/source/cxx/old/zoolib/ZDCRgn.cpp trunk/zoolib/source/cxx/old/zoolib/ZDCRgn.h trunk/zoolib/source/cxx/old/zoolib/ZDC_GDI.cpp trunk/zoolib/source/cxx/old/zoolib/ZDC_GDI.h trunk/zoolib/source/cxx/old/zoolib/ZDC_QD.cpp trunk/zoolib/source/cxx/old/zoolib/ZDC_QD.h trunk/zoolib/source/cxx/old/zoolib/ZDC_X.cpp trunk/zoolib/source/cxx/old/zoolib/ZDC_X.h trunk/zoolib/source/cxx/old/zoolib/ZDC_ZooLib.cpp trunk/zoolib/source/cxx/old/zoolib/ZDC_ZooLib.h trunk/zoolib/source/cxx/old/zoolib/ZMutexComposite.cpp trunk/zoolib/source/cxx/old/zoolib/ZMutexComposite.h trunk/zoolib/source/cxx/old/zoolib/ZNode.cpp trunk/zoolib/source/cxx/old/zoolib/ZNode.h trunk/zoolib/source/cxx/old/zoolib/ZNodeRep_Overlay.cpp trunk/zoolib/source/cxx/old/zoolib/ZNodeRep_Overlay.h trunk/zoolib/source/cxx/old/zoolib/ZNodeRep_Wrapper.cpp trunk/zoolib/source/cxx/old/zoolib/ZNodeRep_Wrapper.h trunk/zoolib/source/cxx/old/zoolib/ZNode_FS.cpp trunk/zoolib/source/cxx/old/zoolib/ZNode_FS.h trunk/zoolib/source/cxx/old/zoolib/ZProgressWatcher.cpp trunk/zoolib/source/cxx/old/zoolib/ZProgressWatcher.h trunk/zoolib/source/cxx/old/zoolib/ZStreamMUX.cpp trunk/zoolib/source/cxx/old/zoolib/ZStreamMUX.h trunk/zoolib/source/cxx/old/zoolib/ZStream_JNI.cpp trunk/zoolib/source/cxx/old/zoolib/ZStream_JNI.h trunk/zoolib/source/cxx/old/zoolib/ZTS_Umbrella.cpp trunk/zoolib/source/cxx/old/zoolib/ZTS_Umbrella.h trunk/zoolib/source/cxx/old/zoolib/ZUtil_Mac_LL.cpp trunk/zoolib/source/cxx/old/zoolib/ZUtil_Mac_LL.h trunk/zoolib/source/cxx/old/zoolib/ZVal_ZooLib.cpp trunk/zoolib/source/cxx/old/zoolib/ZVal_ZooLib.h trunk/zoolib/source/cxx/old/zoolib/ZWebDAV.cpp trunk/zoolib/source/cxx/old/zoolib/ZXLib.cpp trunk/zoolib/source/cxx/old/zoolib/ZXServer.cpp trunk/zoolib/source/cxx/old/zoolib/ZXServer.h trunk/zoolib/source/cxx/old/zoolib/ZYad_ZooLib.cpp trunk/zoolib/source/cxx/old/zoolib/ZYad_ZooLib.h trunk/zoolib/source/cxx/old/zoolib/ZYad_ZooLibStream.cpp trunk/zoolib/source/cxx/old/zoolib/ZYad_ZooLibStream.h trunk/zoolib/source/cxx/old/zoolib/ZYad_ZooLibStrim.cpp trunk/zoolib/source/cxx/old/zoolib/ZYad_ZooLibStrim.h trunk/zoolib/source/cxx/zoolib/ZAccumulator_T.h trunk/zoolib/source/cxx/zoolib/ZAny.cpp trunk/zoolib/source/cxx/zoolib/ZAny.h trunk/zoolib/source/cxx/zoolib/ZAtomic.cpp trunk/zoolib/source/cxx/zoolib/ZAtomic.h trunk/zoolib/source/cxx/zoolib/ZBigRegion.cpp trunk/zoolib/source/cxx/zoolib/ZBigRegion.h trunk/zoolib/source/cxx/zoolib/ZBitStream.cpp trunk/zoolib/source/cxx/zoolib/ZBitStream.h trunk/zoolib/source/cxx/zoolib/ZBlockStore_PhaseTree.cpp trunk/zoolib/source/cxx/zoolib/ZBlockStore_PhaseTree.h trunk/zoolib/source/cxx/zoolib/ZByteSwap.h trunk/zoolib/source/cxx/zoolib/ZCallByCaller.h trunk/zoolib/source/cxx/zoolib/ZCallScheduler.cpp trunk/zoolib/source/cxx/zoolib/ZCallScheduler.h trunk/zoolib/source/cxx/zoolib/ZCallable.h trunk/zoolib/source/cxx/zoolib/ZCallable_Bind.h trunk/zoolib/source/cxx/zoolib/ZCallable_Block.h trunk/zoolib/source/cxx/zoolib/ZCallable_Bool.cpp trunk/zoolib/source/cxx/zoolib/ZCallable_Bool.h trunk/zoolib/source/cxx/zoolib/ZCallable_Caller.h trunk/zoolib/source/cxx/zoolib/ZCallable_Compound.h trunk/zoolib/source/cxx/zoolib/ZCallable_Const.h trunk/zoolib/source/cxx/zoolib/ZCallable_Delay.h trunk/zoolib/source/cxx/zoolib/ZCallable_Function.h trunk/zoolib/source/cxx/zoolib/ZCallable_Indirect.h trunk/zoolib/source/cxx/zoolib/ZCallable_ObjC.h trunk/zoolib/source/cxx/zoolib/ZCallable_PMF.h trunk/zoolib/source/cxx/zoolib/ZCallable_Set.h trunk/zoolib/source/cxx/zoolib/ZCaller.h trunk/zoolib/source/cxx/zoolib/ZCaller_CFRunLoop.cpp trunk/zoolib/source/cxx/zoolib/ZCaller_CFRunLoop.h trunk/zoolib/source/cxx/zoolib/ZCaller_CarbonEvents.cpp trunk/zoolib/source/cxx/zoolib/ZCaller_CarbonEvents.h trunk/zoolib/source/cxx/zoolib/ZCaller_EventLoop.cpp trunk/zoolib/source/cxx/zoolib/ZCaller_EventLoop.h trunk/zoolib/source/cxx/zoolib/ZCaller_Thread.h trunk/zoolib/source/cxx/zoolib/ZCaller_WinMessageLoop.cpp trunk/zoolib/source/cxx/zoolib/ZCaller_WinMessageLoop.h trunk/zoolib/source/cxx/zoolib/ZCog.h trunk/zoolib/source/cxx/zoolib/ZCommandLine.cpp trunk/zoolib/source/cxx/zoolib/ZCommandLine.h trunk/zoolib/source/cxx/zoolib/ZCommandLine_TValue.cpp trunk/zoolib/source/cxx/zoolib/ZCommandLine_TValue.h trunk/zoolib/source/cxx/zoolib/ZCompare.cpp trunk/zoolib/source/cxx/zoolib/ZCompare.h trunk/zoolib/source/cxx/zoolib/ZCompare_String.h trunk/zoolib/source/cxx/zoolib/ZCompare_T.h trunk/zoolib/source/cxx/zoolib/ZCompat_MSVCStaticLib.h trunk/zoolib/source/cxx/zoolib/ZCounted.cpp trunk/zoolib/source/cxx/zoolib/ZCounted.h trunk/zoolib/source/cxx/zoolib/ZCountedVal.h trunk/zoolib/source/cxx/zoolib/ZCountedWithoutFinalize.cpp trunk/zoolib/source/cxx/zoolib/ZCountedWithoutFinalize.h trunk/zoolib/source/cxx/zoolib/ZCtorDtor.h trunk/zoolib/source/cxx/zoolib/ZDCPixmap.cpp trunk/zoolib/source/cxx/zoolib/ZDCPixmap.h trunk/zoolib/source/cxx/zoolib/ZDCPixmapBlit.cpp trunk/zoolib/source/cxx/zoolib/ZDCPixmapBlitPriv.h trunk/zoolib/source/cxx/zoolib/ZDCPixmapCoder.cpp trunk/zoolib/source/cxx/zoolib/ZDCPixmapCoder.h trunk/zoolib/source/cxx/zoolib/ZDCPixmapCoder_BMP.cpp trunk/zoolib/source/cxx/zoolib/ZDCPixmapCoder_BMP.h trunk/zoolib/source/cxx/zoolib/ZDCPixmapCoder_GIF.cpp trunk/zoolib/source/cxx/zoolib/ZDCPixmapCoder_GIF.h trunk/zoolib/source/cxx/zoolib/ZDCPixmapCoder_JPEGLib.cpp trunk/zoolib/source/cxx/zoolib/ZDCPixmapCoder_JPEGLib.h trunk/zoolib/source/cxx/zoolib/ZDCPixmapCoder_PNG.cpp trunk/zoolib/source/cxx/zoolib/ZDCPixmapCoder_PNG.h trunk/zoolib/source/cxx/zoolib/ZDCPixmapNS.cpp trunk/zoolib/source/cxx/zoolib/ZDCPixmapNS.h trunk/zoolib/source/cxx/zoolib/ZDCPixmap_CoreVideo.cpp trunk/zoolib/source/cxx/zoolib/ZDCPixmap_CoreVideo.h trunk/zoolib/source/cxx/zoolib/ZDList.h trunk/zoolib/source/cxx/zoolib/ZData_Any.cpp trunk/zoolib/source/cxx/zoolib/ZData_Any.h trunk/zoolib/source/cxx/zoolib/ZData_CF.cpp trunk/zoolib/source/cxx/zoolib/ZData_CF.h trunk/zoolib/source/cxx/zoolib/ZData_NS.h trunk/zoolib/source/cxx/zoolib/ZData_NS.mm trunk/zoolib/source/cxx/zoolib/ZDebug.cpp trunk/zoolib/source/cxx/zoolib/ZDebug.h trunk/zoolib/source/cxx/zoolib/ZDelegate.h trunk/zoolib/source/cxx/zoolib/ZDelegate.mm trunk/zoolib/source/cxx/zoolib/ZExpr.cpp trunk/zoolib/source/cxx/zoolib/ZExpr.h trunk/zoolib/source/cxx/zoolib/ZExpr_Bool.cpp trunk/zoolib/source/cxx/zoolib/ZExpr_Bool.h trunk/zoolib/source/cxx/zoolib/ZExpr_Bool_ValPred.cpp trunk/zoolib/source/cxx/zoolib/ZExpr_Bool_ValPred.h trunk/zoolib/source/cxx/zoolib/ZExpr_Op_T.h trunk/zoolib/source/cxx/zoolib/ZFile.cpp trunk/zoolib/source/cxx/zoolib/ZFile.h trunk/zoolib/source/cxx/zoolib/ZFile_POSIX.cpp trunk/zoolib/source/cxx/zoolib/ZFile_POSIX.h trunk/zoolib/source/cxx/zoolib/ZFile_Win.cpp trunk/zoolib/source/cxx/zoolib/ZFile_Win.h trunk/zoolib/source/cxx/zoolib/ZFunctionChain.h trunk/zoolib/source/cxx/zoolib/ZGRgn.cpp trunk/zoolib/source/cxx/zoolib/ZGRgn.h trunk/zoolib/source/cxx/zoolib/ZGRgnRep_BigRegion.cpp trunk/zoolib/source/cxx/zoolib/ZGRgnRep_BigRegion.h trunk/zoolib/source/cxx/zoolib/ZGRgnRep_HRGN.cpp trunk/zoolib/source/cxx/zoolib/ZGRgnRep_HRGN.h trunk/zoolib/source/cxx/zoolib/ZGRgnRep_RgnHandle.cpp trunk/zoolib/source/cxx/zoolib/ZGRgnRep_RgnHandle.h trunk/zoolib/source/cxx/zoolib/ZGRgnRep_XRegion.cpp trunk/zoolib/source/cxx/zoolib/ZGRgnRep_XRegion.h trunk/zoolib/source/cxx/zoolib/ZGeom.h trunk/zoolib/source/cxx/zoolib/ZGeomPOD.cpp trunk/zoolib/source/cxx/zoolib/ZGeomPOD.h trunk/zoolib/source/cxx/zoolib/ZGeometry.h trunk/zoolib/source/cxx/zoolib/ZHTTP.cpp trunk/zoolib/source/cxx/zoolib/ZHTTP.h trunk/zoolib/source/cxx/zoolib/ZHTTP_Requests.cpp trunk/zoolib/source/cxx/zoolib/ZHTTP_Requests.h trunk/zoolib/source/cxx/zoolib/ZHandle_T.h trunk/zoolib/source/cxx/zoolib/ZIntervalTreeClock.cpp trunk/zoolib/source/cxx/zoolib/ZIntervalTreeClock.h trunk/zoolib/source/cxx/zoolib/ZLog.cpp trunk/zoolib/source/cxx/zoolib/ZLog.h trunk/zoolib/source/cxx/zoolib/ZMIME.cpp trunk/zoolib/source/cxx/zoolib/ZMIME.h trunk/zoolib/source/cxx/zoolib/ZML.cpp trunk/zoolib/source/cxx/zoolib/ZML.h trunk/zoolib/source/cxx/zoolib/ZMap_CFPreferences.cpp trunk/zoolib/source/cxx/zoolib/ZMap_CFPreferences.h trunk/zoolib/source/cxx/zoolib/ZMatrix.h trunk/zoolib/source/cxx/zoolib/ZMemory.cpp trunk/zoolib/source/cxx/zoolib/ZMemory.h trunk/zoolib/source/cxx/zoolib/ZMulti_T.h trunk/zoolib/source/cxx/zoolib/ZNatter.cpp trunk/zoolib/source/cxx/zoolib/ZNatter.h trunk/zoolib/source/cxx/zoolib/ZNet.cpp trunk/zoolib/source/cxx/zoolib/ZNet.h trunk/zoolib/source/cxx/zoolib/ZNetDNSSD.cpp trunk/zoolib/source/cxx/zoolib/ZNetDNSSD.h trunk/zoolib/source/cxx/zoolib/ZNet_Internet.cpp trunk/zoolib/source/cxx/zoolib/ZNet_Internet.h trunk/zoolib/source/cxx/zoolib/ZNet_Internet_MacOT_OSX.cpp trunk/zoolib/source/cxx/zoolib/ZNet_Internet_MacOT_OSX.h trunk/zoolib/source/cxx/zoolib/ZNet_Internet_Socket.cpp trunk/zoolib/source/cxx/zoolib/ZNet_Internet_Socket.h trunk/zoolib/source/cxx/zoolib/ZNet_Internet_WinSock.cpp trunk/zoolib/source/cxx/zoolib/ZNet_Internet_WinSock.h trunk/zoolib/source/cxx/zoolib/ZNet_Local.cpp trunk/zoolib/source/cxx/zoolib/ZNet_Local.h trunk/zoolib/source/cxx/zoolib/ZNet_Local_Socket.cpp trunk/zoolib/source/cxx/zoolib/ZNet_Local_Socket.h trunk/zoolib/source/cxx/zoolib/ZNet_Local_Win.cpp trunk/zoolib/source/cxx/zoolib/ZNet_Local_Win.h trunk/zoolib/source/cxx/zoolib/ZNet_RFCOMM.cpp trunk/zoolib/source/cxx/zoolib/ZNet_RFCOMM.h trunk/zoolib/source/cxx/zoolib/ZNet_RFCOMM_OSX.h trunk/zoolib/source/cxx/zoolib/ZNet_RFCOMM_OSX.mm trunk/zoolib/source/cxx/zoolib/ZNet_Socket.cpp trunk/zoolib/source/cxx/zoolib/ZNet_Socket.h trunk/zoolib/source/cxx/zoolib/ZObjC.h trunk/zoolib/source/cxx/zoolib/ZObjC.mm trunk/zoolib/source/cxx/zoolib/ZObserver.h trunk/zoolib/source/cxx/zoolib/ZObserver.mm trunk/zoolib/source/cxx/zoolib/ZPromise.h trunk/zoolib/source/cxx/zoolib/ZQ.h trunk/zoolib/source/cxx/zoolib/ZRGBA.cpp trunk/zoolib/source/cxx/zoolib/ZRGBA.h trunk/zoolib/source/cxx/zoolib/ZRGBColor.h trunk/zoolib/source/cxx/zoolib/ZRef.h trunk/zoolib/source/cxx/zoolib/ZRef_NS.h trunk/zoolib/source/cxx/zoolib/ZRef_NS.mm trunk/zoolib/source/cxx/zoolib/ZRoster.cpp trunk/zoolib/source/cxx/zoolib/ZRoster.h trunk/zoolib/source/cxx/zoolib/ZSOCKS.cpp trunk/zoolib/source/cxx/zoolib/ZSOCKS.h trunk/zoolib/source/cxx/zoolib/ZSafe.h trunk/zoolib/source/cxx/zoolib/ZSafeSet.h trunk/zoolib/source/cxx/zoolib/ZSaveRestore_T.h trunk/zoolib/source/cxx/zoolib/ZServer.cpp trunk/zoolib/source/cxx/zoolib/ZServer.h trunk/zoolib/source/cxx/zoolib/ZSetRestore_T.h trunk/zoolib/source/cxx/zoolib/ZSet_T.h trunk/zoolib/source/cxx/zoolib/ZStackCrawl.cpp trunk/zoolib/source/cxx/zoolib/ZStackCrawl.h trunk/zoolib/source/cxx/zoolib/ZStdInt.h trunk/zoolib/source/cxx/zoolib/ZStream.cpp trunk/zoolib/source/cxx/zoolib/ZStream.h trunk/zoolib/source/cxx/zoolib/ZStreamRPos_StreamR.cpp trunk/zoolib/source/cxx/zoolib/ZStreamRPos_StreamR.h trunk/zoolib/source/cxx/zoolib/ZStreamRWCon_MemoryPipe.cpp trunk/zoolib/source/cxx/zoolib/ZStreamRWCon_MemoryPipe.h trunk/zoolib/source/cxx/zoolib/ZStreamRWCon_OpenSSL.cpp trunk/zoolib/source/cxx/zoolib/ZStreamRWCon_OpenSSL.h trunk/zoolib/source/cxx/zoolib/ZStreamRWCon_SSL_OSX.cpp trunk/zoolib/source/cxx/zoolib/ZStreamRWCon_SSL_OSX.h trunk/zoolib/source/cxx/zoolib/ZStreamRWCon_SSL_Win.cpp trunk/zoolib/source/cxx/zoolib/ZStreamRWCon_SSL_Win.h trunk/zoolib/source/cxx/zoolib/ZStreamRWPos_RAM.cpp trunk/zoolib/source/cxx/zoolib/ZStreamRWPos_RAM.h trunk/zoolib/source/cxx/zoolib/ZStreamRW_FIFO.cpp trunk/zoolib/source/cxx/zoolib/ZStreamRW_FIFO.h trunk/zoolib/source/cxx/zoolib/ZStreamRW_FlushOnRead.cpp trunk/zoolib/source/cxx/zoolib/ZStreamRW_FlushOnRead.h trunk/zoolib/source/cxx/zoolib/ZStreamR_Boundary.cpp trunk/zoolib/source/cxx/zoolib/ZStreamR_Boundary.h trunk/zoolib/source/cxx/zoolib/ZStreamR_Cat.cpp trunk/zoolib/source/cxx/zoolib/ZStreamR_Cat.h trunk/zoolib/source/cxx/zoolib/ZStreamR_HexStrim.cpp trunk/zoolib/source/cxx/zoolib/ZStreamR_HexStrim.h trunk/zoolib/source/cxx/zoolib/ZStreamR_Random.cpp trunk/zoolib/source/cxx/zoolib/ZStreamR_Random.h trunk/zoolib/source/cxx/zoolib/ZStreamR_SkipAllOnDestroy.cpp trunk/zoolib/source/cxx/zoolib/ZStreamR_SkipAllOnDestroy.h trunk/zoolib/source/cxx/zoolib/ZStreamR_Source.cpp trunk/zoolib/source/cxx/zoolib/ZStreamR_Source.h trunk/zoolib/source/cxx/zoolib/ZStreamW_Fragmented.cpp trunk/zoolib/source/cxx/zoolib/ZStreamW_Fragmented.h trunk/zoolib/source/cxx/zoolib/ZStreamW_HexStrim.cpp trunk/zoolib/source/cxx/zoolib/ZStreamW_HexStrim.h trunk/zoolib/source/cxx/zoolib/ZStream_ASCIIStrim.cpp trunk/zoolib/source/cxx/zoolib/ZStream_ASCIIStrim.h trunk/zoolib/source/cxx/zoolib/ZStream_Base64.cpp trunk/zoolib/source/cxx/zoolib/ZStream_Base64.h trunk/zoolib/source/cxx/zoolib/ZStream_Buffered.cpp trunk/zoolib/source/cxx/zoolib/ZStream_Buffered.h trunk/zoolib/source/cxx/zoolib/ZStream_CFStream.cpp trunk/zoolib/source/cxx/zoolib/ZStream_CFStream.h trunk/zoolib/source/cxx/zoolib/ZStream_CGData.cpp trunk/zoolib/source/cxx/zoolib/ZStream_CGData.h trunk/zoolib/source/cxx/zoolib/ZStream_CRLF.cpp trunk/zoolib/source/cxx/zoolib/ZStream_CRLF.h trunk/zoolib/source/cxx/zoolib/ZStream_Chunked.cpp trunk/zoolib/source/cxx/zoolib/ZStream_Chunked.h trunk/zoolib/source/cxx/zoolib/ZStream_Compressed.cpp trunk/zoolib/source/cxx/zoolib/ZStream_Compressed.h trunk/zoolib/source/cxx/zoolib/ZStream_Count.cpp trunk/zoolib/source/cxx/zoolib/ZStream_Count.h trunk/zoolib/source/cxx/zoolib/ZStream_Data_T.h trunk/zoolib/source/cxx/zoolib/ZStream_Filter.cpp trunk/zoolib/source/cxx/zoolib/ZStream_Filter.h trunk/zoolib/source/cxx/zoolib/ZStream_LZW.cpp trunk/zoolib/source/cxx/zoolib/ZStream_LZW.h trunk/zoolib/source/cxx/zoolib/ZStream_Limited.cpp trunk/zoolib/source/cxx/zoolib/ZStream_Limited.h trunk/zoolib/source/cxx/zoolib/ZStream_MD5.cpp trunk/zoolib/source/cxx/zoolib/ZStream_MD5.h trunk/zoolib/source/cxx/zoolib/ZStream_Mac.cpp trunk/zoolib/source/cxx/zoolib/ZStream_Mac.h trunk/zoolib/source/cxx/zoolib/ZStream_Memory.cpp trunk/zoolib/source/cxx/zoolib/ZStream_Memory.h trunk/zoolib/source/cxx/zoolib/ZStream_POSIX.cpp trunk/zoolib/source/cxx/zoolib/ZStream_POSIX.h trunk/zoolib/source/cxx/zoolib/ZStream_PageBuffered.cpp trunk/zoolib/source/cxx/zoolib/ZStream_PageBuffered.h trunk/zoolib/source/cxx/zoolib/ZStream_RateCapped.cpp trunk/zoolib/source/cxx/zoolib/ZStream_RateCapped.h trunk/zoolib/source/cxx/zoolib/ZStream_SHA1.cpp trunk/zoolib/source/cxx/zoolib/ZStream_SHA1.h trunk/zoolib/source/cxx/zoolib/ZStream_String.cpp trunk/zoolib/source/cxx/zoolib/ZStream_String.h trunk/zoolib/source/cxx/zoolib/ZStream_Tee.cpp trunk/zoolib/source/cxx/zoolib/ZStream_Tee.h trunk/zoolib/source/cxx/zoolib/ZStream_Win.cpp trunk/zoolib/source/cxx/zoolib/ZStream_Win.h trunk/zoolib/source/cxx/zoolib/ZStream_ZLib.cpp trunk/zoolib/source/cxx/zoolib/ZStream_ZLib.h trunk/zoolib/source/cxx/zoolib/ZStream_bzip2.cpp trunk/zoolib/source/cxx/zoolib/ZStream_bzip2.h trunk/zoolib/source/cxx/zoolib/ZStreamer.cpp trunk/zoolib/source/cxx/zoolib/ZStreamer.h trunk/zoolib/source/cxx/zoolib/ZStreamerFactory_Precon.cpp trunk/zoolib/source/cxx/zoolib/ZStreamerFactory_Precon.h trunk/zoolib/source/cxx/zoolib/ZStreamerRPos_StreamR.cpp trunk/zoolib/source/cxx/zoolib/ZStreamerRPos_StreamR.h trunk/zoolib/source/cxx/zoolib/ZStreamerRWFactory_Buffered.cpp trunk/zoolib/source/cxx/zoolib/ZStreamerRWFactory_Buffered.h trunk/zoolib/source/cxx/zoolib/ZStreamerRWFactory_Fallback.cpp trunk/zoolib/source/cxx/zoolib/ZStreamerRWFactory_Fallback.h trunk/zoolib/source/cxx/zoolib/ZStreamerRWFactory_Retry.cpp trunk/zoolib/source/cxx/zoolib/ZStreamerRWFactory_Retry.h trunk/zoolib/source/cxx/zoolib/ZStrim.cpp trunk/zoolib/source/cxx/zoolib/ZStrim.h trunk/zoolib/source/cxx/zoolib/ZStrimR_Boundary.cpp trunk/zoolib/source/cxx/zoolib/ZStrimR_Boundary.h trunk/zoolib/source/cxx/zoolib/ZStrimR_Rewind.cpp trunk/zoolib/source/cxx/zoolib/ZStrimR_Rewind.h trunk/zoolib/source/cxx/zoolib/ZStrimU_Std.cpp trunk/zoolib/source/cxx/zoolib/ZStrimU_Std.h trunk/zoolib/source/cxx/zoolib/ZStrimU_StreamUTF8Buffered.cpp trunk/zoolib/source/cxx/zoolib/ZStrimU_StreamUTF8Buffered.h trunk/zoolib/source/cxx/zoolib/ZStrimU_Unreader.cpp trunk/zoolib/source/cxx/zoolib/ZStrimU_Unreader.h trunk/zoolib/source/cxx/zoolib/ZStrimW_WinDebug.cpp trunk/zoolib/source/cxx/zoolib/ZStrimW_WinDebug.h trunk/zoolib/source/cxx/zoolib/ZStrim_CFString.cpp trunk/zoolib/source/cxx/zoolib/ZStrim_CFString.h trunk/zoolib/source/cxx/zoolib/ZStrim_CRLF.cpp trunk/zoolib/source/cxx/zoolib/ZStrim_CRLF.h trunk/zoolib/source/cxx/zoolib/ZStrim_Escaped.cpp trunk/zoolib/source/cxx/zoolib/ZStrim_Escaped.h trunk/zoolib/source/cxx/zoolib/ZStrim_Limited.cpp trunk/zoolib/source/cxx/zoolib/ZStrim_Limited.h trunk/zoolib/source/cxx/zoolib/ZStrim_NSString.h trunk/zoolib/source/cxx/zoolib/ZStrim_NSString.mm trunk/zoolib/source/cxx/zoolib/ZStrim_Stream.cpp trunk/zoolib/source/cxx/zoolib/ZStrim_Stream.h trunk/zoolib/source/cxx/zoolib/ZStrim_Tee.cpp trunk/zoolib/source/cxx/zoolib/ZStrim_Tee.h trunk/zoolib/source/cxx/zoolib/ZStrimmer.cpp trunk/zoolib/source/cxx/zoolib/ZStrimmer.h trunk/zoolib/source/cxx/zoolib/ZStrimmer_Stream.h trunk/zoolib/source/cxx/zoolib/ZStrimmer_Streamer.h trunk/zoolib/source/cxx/zoolib/ZTName.cpp trunk/zoolib/source/cxx/zoolib/ZTName.h trunk/zoolib/source/cxx/zoolib/ZTagVal.h trunk/zoolib/source/cxx/zoolib/ZTextCoder.cpp trunk/zoolib/source/cxx/zoolib/ZTextCoder.h trunk/zoolib/source/cxx/zoolib/ZTextCoder_ICU.cpp trunk/zoolib/source/cxx/zoolib/ZTextCoder_ICU.h trunk/zoolib/source/cxx/zoolib/ZTextCoder_Mac.cpp trunk/zoolib/source/cxx/zoolib/ZTextCoder_Mac.h trunk/zoolib/source/cxx/zoolib/ZTextCoder_Std.cpp trunk/zoolib/source/cxx/zoolib/ZTextCoder_Std.h trunk/zoolib/source/cxx/zoolib/ZTextCoder_Unicode.cpp trunk/zoolib/source/cxx/zoolib/ZTextCoder_Unicode.h trunk/zoolib/source/cxx/zoolib/ZTextCoder_Win.cpp trunk/zoolib/source/cxx/zoolib/ZTextCoder_Win.h trunk/zoolib/source/cxx/zoolib/ZTextCoder_iconv.cpp trunk/zoolib/source/cxx/zoolib/ZTextCoder_iconv.h trunk/zoolib/source/cxx/zoolib/ZTextCollator.cpp trunk/zoolib/source/cxx/zoolib/ZTextCollator.h trunk/zoolib/source/cxx/zoolib/ZTextCollator_ASCII.cpp trunk/zoolib/source/cxx/zoolib/ZTextCollator_ASCII.h trunk/zoolib/source/cxx/zoolib/ZTextCollator_ICU.cpp trunk/zoolib/source/cxx/zoolib/ZTextCollator_ICU.h trunk/zoolib/source/cxx/zoolib/ZThread.cpp trunk/zoolib/source/cxx/zoolib/ZThread.h trunk/zoolib/source/cxx/zoolib/ZThreadSafe.h trunk/zoolib/source/cxx/zoolib/ZThreadVal.h trunk/zoolib/source/cxx/zoolib/ZThread_MacMP.cpp trunk/zoolib/source/cxx/zoolib/ZThread_MacMP.h trunk/zoolib/source/cxx/zoolib/ZThread_T.h trunk/zoolib/source/cxx/zoolib/ZThread_Win.cpp trunk/zoolib/source/cxx/zoolib/ZThread_Win.h trunk/zoolib/source/cxx/zoolib/ZThread_boost.cpp trunk/zoolib/source/cxx/zoolib/ZThread_boost.h trunk/zoolib/source/cxx/zoolib/ZThread_pthread.cpp trunk/zoolib/source/cxx/zoolib/ZThread_pthread.h trunk/zoolib/source/cxx/zoolib/ZTime.cpp trunk/zoolib/source/cxx/zoolib/ZTime.h trunk/zoolib/source/cxx/zoolib/ZTrail.cpp trunk/zoolib/source/cxx/zoolib/ZTrail.h trunk/zoolib/source/cxx/zoolib/ZTween.h trunk/zoolib/source/cxx/zoolib/ZTween_Std.h trunk/zoolib/source/cxx/zoolib/ZTxn.cpp trunk/zoolib/source/cxx/zoolib/ZTxn.h trunk/zoolib/source/cxx/zoolib/ZUSB_OSX.cpp trunk/zoolib/source/cxx/zoolib/ZUSB_OSX.h trunk/zoolib/source/cxx/zoolib/ZUniSet_T.h trunk/zoolib/source/cxx/zoolib/ZUnicode.cpp trunk/zoolib/source/cxx/zoolib/ZUnicode.h trunk/zoolib/source/cxx/zoolib/ZUnicodePriv.h trunk/zoolib/source/cxx/zoolib/ZUnicodePrivB.h trunk/zoolib/source/cxx/zoolib/ZUnicode_Normalize.cpp trunk/zoolib/source/cxx/zoolib/ZUnicode_Normalize.h trunk/zoolib/source/cxx/zoolib/ZUnicode_Normalize_CF.cpp trunk/zoolib/source/cxx/zoolib/ZUnicode_Normalize_ICU.cpp trunk/zoolib/source/cxx/zoolib/ZUnicode_Normalize_Win.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_ATSUI.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_ATSUI.h trunk/zoolib/source/cxx/zoolib/ZUtil_Any.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Any.h trunk/zoolib/source/cxx/zoolib/ZUtil_AppleEvent.h trunk/zoolib/source/cxx/zoolib/ZUtil_CF.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_CF.h trunk/zoolib/source/cxx/zoolib/ZUtil_CF_Context.h trunk/zoolib/source/cxx/zoolib/ZUtil_CarbonEvents.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_CarbonEvents.h trunk/zoolib/source/cxx/zoolib/ZUtil_Debug.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Debug.h trunk/zoolib/source/cxx/zoolib/ZUtil_Expr_Bool_CNF.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Expr_Bool_CNF.h trunk/zoolib/source/cxx/zoolib/ZUtil_Expr_Bool_ValPred_Rename.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Expr_Bool_ValPred_Rename.h trunk/zoolib/source/cxx/zoolib/ZUtil_MacOSX.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_MacOSX.h trunk/zoolib/source/cxx/zoolib/ZUtil_NS.h trunk/zoolib/source/cxx/zoolib/ZUtil_NS.mm trunk/zoolib/source/cxx/zoolib/ZUtil_POSIXFD.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_POSIXFD.h trunk/zoolib/source/cxx/zoolib/ZUtil_STL_map.h trunk/zoolib/source/cxx/zoolib/ZUtil_STL_set.h trunk/zoolib/source/cxx/zoolib/ZUtil_STL_vector.h trunk/zoolib/source/cxx/zoolib/ZUtil_Strim.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Strim.h trunk/zoolib/source/cxx/zoolib/ZUtil_Strim_Data.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Strim_Data.h trunk/zoolib/source/cxx/zoolib/ZUtil_Strim_IntervalTreeClock.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Strim_IntervalTreeClock.h trunk/zoolib/source/cxx/zoolib/ZUtil_Strim_ValPred_Any.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Strim_ValPred_Any.h trunk/zoolib/source/cxx/zoolib/ZUtil_Strimmer.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Strimmer.h trunk/zoolib/source/cxx/zoolib/ZUtil_SystemConfiguration.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_SystemConfiguration.h trunk/zoolib/source/cxx/zoolib/ZUtil_Time.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Time.h trunk/zoolib/source/cxx/zoolib/ZUtil_WinFile.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_WinFile.h trunk/zoolib/source/cxx/zoolib/ZUtil_Yad.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_Yad.h trunk/zoolib/source/cxx/zoolib/ZUtil_string.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_string.h trunk/zoolib/source/cxx/zoolib/ZVal.cpp trunk/zoolib/source/cxx/zoolib/ZVal.h trunk/zoolib/source/cxx/zoolib/ZValAccessors.h trunk/zoolib/source/cxx/zoolib/ZValAccessors_Std.h trunk/zoolib/source/cxx/zoolib/ZValPred.cpp trunk/zoolib/source/cxx/zoolib/ZValPred.h trunk/zoolib/source/cxx/zoolib/ZValPred_Any.cpp trunk/zoolib/source/cxx/zoolib/ZValPred_Any.h trunk/zoolib/source/cxx/zoolib/ZValPred_GetNames.cpp trunk/zoolib/source/cxx/zoolib/ZVal_Any.cpp trunk/zoolib/source/cxx/zoolib/ZVal_Any.h trunk/zoolib/source/cxx/zoolib/ZVal_AppleEvent.cpp trunk/zoolib/source/cxx/zoolib/ZVal_AppleEvent.h trunk/zoolib/source/cxx/zoolib/ZVal_CF.cpp trunk/zoolib/source/cxx/zoolib/ZVal_CF.h trunk/zoolib/source/cxx/zoolib/ZVal_NS.h trunk/zoolib/source/cxx/zoolib/ZVal_NS.mm trunk/zoolib/source/cxx/zoolib/ZVal_Yad.cpp trunk/zoolib/source/cxx/zoolib/ZVal_Yad.h trunk/zoolib/source/cxx/zoolib/ZVisitor.cpp trunk/zoolib/source/cxx/zoolib/ZVisitor.h trunk/zoolib/source/cxx/zoolib/ZVisitor_Do_T.h trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Bool_Do_Eval.cpp trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Bool_Do_Eval.h trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Bool_ToStrim.cpp trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Bool_ToStrim.h trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Bool_ValPred_Any_Do_Eval_Matches.h trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Bool_ValPred_Any_ToStrim.cpp trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Bool_ValPred_Any_ToStrim.h trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Bool_ValPred_Do_GetNames.cpp trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Bool_ValPred_Do_GetNames.h trunk/zoolib/source/cxx/zoolib/ZVisitor_Expr_Op_Do_Transform_T.h trunk/zoolib/source/cxx/zoolib/ZVisitor_ToStrim.cpp trunk/zoolib/source/cxx/zoolib/ZVisitor_ToStrim.h trunk/zoolib/source/cxx/zoolib/ZWND.cpp trunk/zoolib/source/cxx/zoolib/ZWND.h trunk/zoolib/source/cxx/zoolib/ZWinCOM.cpp trunk/zoolib/source/cxx/zoolib/ZWinCOM.h trunk/zoolib/source/cxx/zoolib/ZWinRegistry_Val.cpp trunk/zoolib/source/cxx/zoolib/ZWinRegistry_Val.h trunk/zoolib/source/cxx/zoolib/ZWinRegistry_Yad.cpp trunk/zoolib/source/cxx/zoolib/ZWinRegistry_Yad.h trunk/zoolib/source/cxx/zoolib/ZWinService.cpp trunk/zoolib/source/cxx/zoolib/ZWinService.h trunk/zoolib/source/cxx/zoolib/ZWinWND.cpp trunk/zoolib/source/cxx/zoolib/ZWinWND.h trunk/zoolib/source/cxx/zoolib/ZWorker.cpp trunk/zoolib/source/cxx/zoolib/ZWorker.h trunk/zoolib/source/cxx/zoolib/ZYad.cpp trunk/zoolib/source/cxx/zoolib/ZYad.h trunk/zoolib/source/cxx/zoolib/ZYadSeq_ApplyID.cpp trunk/zoolib/source/cxx/zoolib/ZYadSeq_ApplyID.h trunk/zoolib/source/cxx/zoolib/ZYadTree.cpp trunk/zoolib/source/cxx/zoolib/ZYad_Any.cpp trunk/zoolib/source/cxx/zoolib/ZYad_Any.h trunk/zoolib/source/cxx/zoolib/ZYad_AppleEvent.cpp trunk/zoolib/source/cxx/zoolib/ZYad_AppleEvent.h trunk/zoolib/source/cxx/zoolib/ZYad_Basic.cpp trunk/zoolib/source/cxx/zoolib/ZYad_Basic.h trunk/zoolib/source/cxx/zoolib/ZYad_Bencode.cpp trunk/zoolib/source/cxx/zoolib/ZYad_Bencode.h trunk/zoolib/source/cxx/zoolib/ZYad_CF.cpp trunk/zoolib/source/cxx/zoolib/ZYad_CF.h trunk/zoolib/source/cxx/zoolib/ZYad_DividedValues.cpp trunk/zoolib/source/cxx/zoolib/ZYad_DividedValues.h trunk/zoolib/source/cxx/zoolib/ZYad_FS.cpp trunk/zoolib/source/cxx/zoolib/ZYad_FS.h trunk/zoolib/source/cxx/zoolib/ZYad_JSON.cpp trunk/zoolib/source/cxx/zoolib/ZYad_JSON.h trunk/zoolib/source/cxx/zoolib/ZYad_JSONNormalize.cpp trunk/zoolib/source/cxx/zoolib/ZYad_JSONNormalize.h trunk/zoolib/source/cxx/zoolib/ZYad_ML.cpp trunk/zoolib/source/cxx/zoolib/ZYad_ML.h trunk/zoolib/source/cxx/zoolib/ZYad_MapAsSeq.cpp trunk/zoolib/source/cxx/zoolib/ZYad_MapAsSeq.h trunk/zoolib/source/cxx/zoolib/ZYad_NS.h trunk/zoolib/source/cxx/zoolib/ZYad_NS.mm trunk/zoolib/source/cxx/zoolib/ZYad_Simple.cpp trunk/zoolib/source/cxx/zoolib/ZYad_Simple.h trunk/zoolib/source/cxx/zoolib/ZYad_Std.cpp trunk/zoolib/source/cxx/zoolib/ZYad_Std.h trunk/zoolib/source/cxx/zoolib/ZYad_Val_T.h trunk/zoolib/source/cxx/zoolib/ZYad_XMLAttr.cpp trunk/zoolib/source/cxx/zoolib/ZYad_XMLAttr.h trunk/zoolib/source/cxx/zoolib/ZYad_XMLPList.cpp trunk/zoolib/source/cxx/zoolib/ZYad_XMLPList.h trunk/zoolib/source/cxx/zoolib/ZYad_XMLRPC.cpp trunk/zoolib/source/cxx/zoolib/ZYad_XMLRPC.h Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry.cpp 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry.cpp 2012-01-15 05:07:51 UTC (rev 2676) @@ -28,8 +28,7 @@ namespace ZBlackBerry { // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Manager +// MARK: - ZBlackBerry::Manager /** \class Manager @@ -52,8 +51,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Device +// MARK: - ZBlackBerry::Device /** \class Device @@ -83,8 +81,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Channel +// MARK: - ZBlackBerry::Channel /** \class Channel Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry.h 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry.h 2012-01-15 05:07:51 UTC (rev 2676) @@ -44,8 +44,7 @@ class Channel; // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Manager +// MARK: - ZBlackBerry::Manager class Manager : public ZCounted { @@ -71,8 +70,7 @@ }; // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Device +// MARK: - ZBlackBerry::Device class Device : public ZCounted { @@ -114,8 +112,7 @@ }; // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Channel +// MARK: - ZBlackBerry::Channel class Channel : public ZStreamerRWCon { Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryCOM.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryCOM.h 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryCOM.h 2012-01-15 05:07:51 UTC (rev 2676) @@ -38,8 +38,7 @@ namespace ZBlackBerryCOM { // ================================================================================================= -#pragma mark - -#pragma mark * IChannelEvents +// MARK: - IChannelEvents ZMACRO_WinCOM_Class(IChannelEvents, IUnknown, C7168312,A0F4,46DF,B8,2A,54,8C,FB,08,75,5E) @@ -51,8 +50,7 @@ }; // ================================================================================================= -#pragma mark - -#pragma mark * IChannel +// MARK: - IChannel struct ChannelParams { @@ -74,8 +72,7 @@ }; // ================================================================================================= -#pragma mark - -#pragma mark * IDeviceProperty +// MARK: - IDeviceProperty ZMACRO_WinCOM_Class(IDeviceProperty, IUnknown, C7168310,A0F4,46DF,B8,2A,54,8C,FB,08,75,5E) @@ -85,8 +82,7 @@ }; // ================================================================================================= -#pragma mark - -#pragma mark * IDeviceProperties +// MARK: - IDeviceProperties ZMACRO_WinCOM_Class(IDeviceProperties, IUnknown, C716830F,A0F4,46DF,B8,2A,54,8C,FB,08,75,5E) @@ -96,8 +92,7 @@ }; // ================================================================================================= -#pragma mark - -#pragma mark * IDevice +// MARK: - IDevice ZMACRO_WinCOM_Class(IDevice, IUnknown, C716830E,A0F4,46DF,B8,2A,54,8C,FB,08,75,5E) @@ -113,8 +108,7 @@ }; // ================================================================================================= -#pragma mark - -#pragma mark * IDevices +// MARK: - IDevices ZMACRO_WinCOM_Class(IDevices, IUnknown, C716830D,A0F4,46DF,B8,2A,54,8C,FB,08,75,5E) @@ -124,8 +118,7 @@ }; // ================================================================================================= -#pragma mark - -#pragma mark * IDeviceManagerEvents +// MARK: - IDeviceManagerEvents ZMACRO_WinCOM_Class(IDeviceManagerEvents, IUnknown, C716830C,A0F4,46DF,B8,2A,54,8C,FB,08,75,5E) @@ -135,8 +128,7 @@ }; // ================================================================================================= -#pragma mark - -#pragma mark * IDeviceManagerNotification +// MARK: - IDeviceManagerNotification ZMACRO_WinCOM_Class(IDeviceManagerNotification, IDeviceManagerEvents, 5F67EACC,D387,4B71,96,37,59,69,01,D0,0C,E0) @@ -147,8 +139,7 @@ }; // ================================================================================================= -#pragma mark - -#pragma mark * IDeviceManager +// MARK: - IDeviceManager ZMACRO_WinCOM_Class(IDeviceManager, IUnknown, C716830B,A0F4,46DF,B8,2A,54,8C,FB,08,75,5E) Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp 2012-01-15 05:07:51 UTC (rev 2676) @@ -35,8 +35,7 @@ namespace ZooLib { // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerryServer::Handler_ManagerChanged +// MARK: - ZBlackBerryServer::Handler_ManagerChanged class ZBlackBerryServer::Handler_ManagerChanged : public ZCommer @@ -152,8 +151,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerryServer::Handler_DeviceFinished +// MARK: - ZBlackBerryServer::Handler_DeviceFinished class ZBlackBerryServer::Handler_DeviceFinished : public ZCommer @@ -237,8 +235,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerryServer +// MARK: - ZBlackBerryServer static string spReadString(const ZStreamR& r) { Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.h 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.h 2012-01-15 05:07:51 UTC (rev 2676) @@ -29,8 +29,7 @@ namespace ZooLib { // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerryServer +// MARK: - ZBlackBerryServer class ZBlackBerryServer { Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_BBDevMgr.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_BBDevMgr.cpp 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_BBDevMgr.cpp 2012-01-15 05:07:51 UTC (rev 2676) @@ -41,8 +41,7 @@ using namespace ZWinCOM; // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Channel_BBDevMgr +// MARK: - ZBlackBerry::Channel_BBDevMgr class Channel_BBDevMgr : private IChannelEvents, @@ -465,8 +464,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Device_BBDevMgr +// MARK: - ZBlackBerry::Device_BBDevMgr class Device_BBDevMgr : public Device { @@ -603,8 +601,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Manager_BBDevMgr +// MARK: - ZBlackBerry::Manager_BBDevMgr Manager_BBDevMgr::Manager_BBDevMgr() : fNextID(1) Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_BBDevMgr.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_BBDevMgr.h 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_BBDevMgr.h 2012-01-15 05:07:51 UTC (rev 2676) @@ -44,8 +44,7 @@ class Device_BBDevMgr; // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Manager_BBDevMgr +// MARK: - ZBlackBerry::Manager_BBDevMgr class Manager_BBDevMgr : private ZBlackBerryCOM::IDeviceManagerEvents, Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp 2012-01-15 05:07:51 UTC (rev 2676) @@ -33,8 +33,7 @@ namespace ZBlackBerry { // ================================================================================================= -#pragma mark - -#pragma mark * Channel_Client +// MARK: - Channel_Client class Channel_Client : public Channel, @@ -125,8 +124,7 @@ { fSRWCon->GetStreamWCon().Abort(); } // ================================================================================================= -#pragma mark - -#pragma mark * Device_Client +// MARK: - Device_Client class Device_Client : public Device, @@ -312,8 +310,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * Manager_Client::Commer_Changed +// MARK: - Manager_Client::Commer_Changed class Manager_Client::Commer_Changed : public ZCommer { @@ -397,8 +394,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * Manager_Client +// MARK: - Manager_Client Manager_Client::Manager_Client() {} Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.h 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.h 2012-01-15 05:07:51 UTC (rev 2676) @@ -28,8 +28,7 @@ namespace ZBlackBerry { // ================================================================================================= -#pragma mark - -#pragma mark * Manager_Client +// MARK: - Manager_Client class Manager_Client : public Manager Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_OSXUSB.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_OSXUSB.cpp 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_OSXUSB.cpp 2012-01-15 05:07:51 UTC (rev 2676) @@ -37,8 +37,7 @@ namespace ZBlackBerry { // ================================================================================================= -#pragma mark - -#pragma mark * BlackBerry USB stuff +// MARK: - BlackBerry USB stuff static bool spSendControlMessage(IOUSBDeviceInterface182** iUDI, uint8_t bRequestType, uint8_t bRequest, @@ -158,8 +157,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Manager_OSXUSB +// MARK: - ZBlackBerry::Manager_OSXUSB Manager_OSXUSB::Manager_OSXUSB(CFRunLoopRef iRunLoopRef, bool iAllowMassStorage) : fRunLoopRef(iRunLoopRef), Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_OSXUSB.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_OSXUSB.h 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_OSXUSB.h 2012-01-15 05:07:51 UTC (rev 2676) @@ -53,8 +53,7 @@ namespace ZBlackBerry { // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Manager_OSXUSB +// MARK: - ZBlackBerry::Manager_OSXUSB class Manager_OSXUSB : public Manager Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp 2012-01-15 05:07:51 UTC (rev 2676) @@ -40,8 +40,7 @@ namespace ZBlackBerry { // ================================================================================================= -#pragma mark - -#pragma mark * Protocol constants +// MARK: - Protocol constants enum EMsg { @@ -131,8 +130,7 @@ */ // ================================================================================================= -#pragma mark - -#pragma mark * StreamW_Chunked +// MARK: - StreamW_Chunked class StreamW_Chunked : public ZStreamW { @@ -183,8 +181,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Commer_Streamer declaration +// MARK: - ZBlackBerry::Commer_Streamer declaration class Channel_Streamer; @@ -270,8 +267,7 @@ }; // ================================================================================================= -#pragma mark - -#pragma mark * Channel_Streamer +// MARK: - Channel_Streamer class Channel_Streamer : public ZBlackBerry::Channel, @@ -461,8 +457,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * Commer_Streamer definition +// MARK: - Commer_Streamer definition Commer_Streamer::Commer_Streamer(ZRef<ZStreamerR> iStreamerR, ZRef<ZStreamerW> iStreamerW) : ZCommer(iStreamerR, iStreamerW), @@ -1562,8 +1557,7 @@ } // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Device_Streamer +// MARK: - ZBlackBerry::Device_Streamer Device_Streamer::Device_Streamer(ZRef<ZStreamerR> iStreamerR, ZRef<ZStreamerW> iStreamerW) : fStreamerR(iStreamerR), Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.h 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.h 2012-01-15 05:07:51 UTC (rev 2676) @@ -31,8 +31,7 @@ class Commer_Streamer; // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Device_Streamer +// MARK: - ZBlackBerry::Device_Streamer class Device_Streamer : public Device Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Union.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Union.cpp 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Union.cpp 2012-01-15 05:07:51 UTC (rev 2676) @@ -29,8 +29,7 @@ namespace ZBlackBerry { // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Manager_Union +// MARK: - ZBlackBerry::Manager_Union Manager_Union::Manager_Union(const vector<ZRef<Manager> >& iManagers) { Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Union.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Union.h 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Union.h 2012-01-15 05:07:51 UTC (rev 2676) @@ -28,8 +28,7 @@ namespace ZBlackBerry { // ================================================================================================= -#pragma mark - -#pragma mark * ZBlackBerry::Manager_Union +// MARK: - ZBlackBerry::Manager_Union class Manager_Union : public Manager, Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZUtil_BlackBerry.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZUtil_BlackBerry.cpp 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZUtil_BlackBerry.cpp 2012-01-15 05:07:51 UTC (rev 2676) @@ -34,8 +34,7 @@ namespace ZUtil_BlackBerry { // ================================================================================================= -#pragma mark - -#pragma mark * ZUtil_BlackBerry +// MARK: - ZUtil_BlackBerry ZRef<ZBlackBerry::Manager> sMakeManager(ZRef<ZStreamerRWConFactory> iFactory) { Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZUtil_BlackBerry.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZUtil_BlackBerry.h 2012-01-12 23:16:32 UTC (rev 2675) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZUtil_BlackBerry.h 2012-01-15 05:07:51 UTC (rev 2676) @@ -28,8 +28,7 @@ namespace ZUtil_BlackBerry { // ================================================================================================= -#pragma mark - -#pragma mark * ZUtil_BlackBerry +// MARK: - ZUtil_BlackBerry ZRef<ZBlackBerry::Manager> sMakeManager(ZRef<ZStreamerRWConFactory> iFactor... [truncated message content] |
From: <ag...@us...> - 2012-01-12 23:16:38
|
Revision: 2675 http://zoolib.svn.sourceforge.net/zoolib/?rev=2675&view=rev Author: agreen Date: 2012-01-12 23:16:32 +0000 (Thu, 12 Jan 2012) Log Message: ----------- Comments. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZVal.cpp Modified: trunk/zoolib/source/cxx/zoolib/ZVal.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZVal.cpp 2012-01-12 23:16:18 UTC (rev 2674) +++ trunk/zoolib/source/cxx/zoolib/ZVal.cpp 2012-01-12 23:16:32 UTC (rev 2675) @@ -50,13 +50,14 @@ appropriate distinguishing string. Some of the suites are placed within a namespace YYY, wherein the types are named \c YYY::Val, \c YYY::Seq and \c YYY:Map. -When working with a Val you may use simple assignment, or using a templated Set method: +When working with a Val you may use simple assignment or a templated Set method: \code Val theVal = 27; theVal.Set<long>(19); \endcode The latter makes the stored type explicit. The actual stored type is usually important, because -you can only retrieve the value if you know what type was used to store it (think long vs int, or +oftentimes you can only retrieve the value if you know what type was used to store it (think +long vs int, or even unsigned vs signed). There are several ways to get a value. Which you use depends on what you're doing: @@ -107,8 +108,8 @@ \c DGetXXX and \c QGetXXX are often provided, where \c XXX is the generalized typename (eg \c Int32, \c Int64, \c Float etc). -The Get/Set API for Seq is based on that for Val, but with an initial index parameter. In addition -it adds a \c Count method returning the number of Vals in the Seq, and generally has +The Get/Set API for Seq is based on that for Val, but with an initial index parameter. It +has a \c Count method returning the number of Vals in the Seq, and generally has \c Erase, \c Insert and \c Append methods. Map is similar, but here the initial parameter is a name of some sort. Generally a std::string can This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-12 23:16:24
|
Revision: 2674 http://zoolib.svn.sourceforge.net/zoolib/?rev=2674&view=rev Author: agreen Date: 2012-01-12 23:16:18 +0000 (Thu, 12 Jan 2012) Log Message: ----------- Harminize body of With and WithUnchanged. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-11 21:31:41 UTC (rev 2673) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-12 23:16:18 UTC (rev 2674) @@ -827,17 +827,19 @@ { ZAssert(sIsPending(lCog0) && sIsPending(iCog1)); - if (sCallPendingCog_Changed(lCog0, iParam)) - return lCog0; + if (sCallPendingCog_Unchanged(lCog0, iParam)) + { + ZCog<Param> newCog1 = iCog1; + if (sCallPendingCog_Unchanged(newCog1, iParam)) + return iSelf; - ZCog<Param> newCog1 = iCog1; - if (sCallPendingCog_Unchanged(newCog1, iParam)) - return iSelf; + if (sIsFinished(newCog1)) + return lCog0; - if (sIsFinished(newCog1)) - return lCog0; + return spCog_WithUnchanged(lCog0, newCog1); + } - return spCog_WithUnchanged(lCog0, newCog1); + return lCog0; } template <class Param> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-11 21:31:50
|
Revision: 2673 http://zoolib.svn.sourceforge.net/zoolib/?rev=2673&view=rev Author: agreen Date: 2012-01-11 21:31:41 +0000 (Wed, 11 Jan 2012) Log Message: ----------- Updates. Modified Paths: -------------- trunk/zoolib_samples/FlashHost/build-cw/FlashHost.mcp trunk/zoolib_samples/FlashHost/build-xcode/FlashHost.xcodeproj/project.pbxproj trunk/zoolib_samples/FlashHost/src/FlashHost.cpp trunk/zoolib_samples/FlashHost/src/FlashHost.h trunk/zoolib_samples/FlashHost/src/FlashHost_Main.cpp trunk/zoolib_samples/FlashHost/src/FlashHost_Main.mm trunk/zoolib_samples/FlashHost/src/NSApplicationDelegate_FlashHost.mm Modified: trunk/zoolib_samples/FlashHost/build-cw/FlashHost.mcp =================================================================== (Binary files differ) Modified: trunk/zoolib_samples/FlashHost/build-xcode/FlashHost.xcodeproj/project.pbxproj =================================================================== --- trunk/zoolib_samples/FlashHost/build-xcode/FlashHost.xcodeproj/project.pbxproj 2012-01-11 21:28:20 UTC (rev 2672) +++ trunk/zoolib_samples/FlashHost/build-xcode/FlashHost.xcodeproj/project.pbxproj 2012-01-11 21:31:41 UTC (rev 2673) @@ -13,7 +13,6 @@ C003F330125F80D800C11A02 /* ZCountedWithoutFinalize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C003F32F125F80D800C11A02 /* ZCountedWithoutFinalize.cpp */; }; C005D15E11697C300055865A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C005D15D11697C300055865A /* Security.framework */; }; C0086073118C84000097CFB3 /* ZCounted.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0086072118C84000097CFB3 /* ZCounted.cpp */; }; - C008607E118C84290097CFB3 /* ZWorkerRunner_Thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C008607D118C84290097CFB3 /* ZWorkerRunner_Thread.cpp */; }; C00B4FCD115ED0820009AB11 /* ZStreamerRWCon_SSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C00B4FCA115ED0820009AB11 /* ZStreamerRWCon_SSL.cpp */; }; C00B4FCE115ED0820009AB11 /* ZStreamRWCon_SSL_OSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C00B4FCB115ED0820009AB11 /* ZStreamRWCon_SSL_OSX.cpp */; }; C00B4FCF115ED0820009AB11 /* ZStreamRWCon_SSL_Win.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C00B4FCC115ED0820009AB11 /* ZStreamRWCon_SSL_Win.cpp */; }; @@ -86,10 +85,14 @@ C07D2E4E1121E0EF003C0AED /* ZVal_Any.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C07D2E4D1121E0EF003C0AED /* ZVal_Any.cpp */; }; C07D2E6E1121E16F003C0AED /* ZUtil_CarbonEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C01178540F24E37500E7E01D /* ZUtil_CarbonEvents.cpp */; }; C09C94920FB881B700959F95 /* FlashHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C09C94900FB881B700959F95 /* FlashHost.cpp */; }; + C0AF0B1613DF262F00C5661B /* ZCaller_CFRunLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0AF0B1413DF262F00C5661B /* ZCaller_CFRunLoop.cpp */; }; + C0AF0B1713DF262F00C5661B /* ZUtil_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0AF0B1513DF262F00C5661B /* ZUtil_string.cpp */; }; + C0AF0B1B13DF264000C5661B /* ZCaller_EventLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0AF0B1A13DF264000C5661B /* ZCaller_EventLoop.cpp */; }; C0DA8E461268A2E6001E643C /* NSApplicationDelegate_FlashHost.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0DA8E451268A2E6001E643C /* NSApplicationDelegate_FlashHost.mm */; }; C0DA8EAE1268A4E3001E643C /* ZObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0DA8EAD1268A4E3001E643C /* ZObjC.mm */; }; C0DA8F6C1268AB15001E643C /* MainNib.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0DA8F6B1268AB15001E643C /* MainNib.xib */; }; C0E30E8412669AB100642353 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0E30E8312669AB100642353 /* Cocoa.framework */; }; + C0E49CFA13C655BF00ED02FB /* ZCallScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0E49CF913C655BF00ED02FB /* ZCallScheduler.cpp */; }; C0F3B558102B8D7C002231CB /* ZNetscape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0F3B553102B8D7C002231CB /* ZNetscape.cpp */; }; C0F3B559102B8D7C002231CB /* ZNetscape_GuestFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0F3B554102B8D7C002231CB /* ZNetscape_GuestFactory.cpp */; }; C0F3B55A102B8D7C002231CB /* ZNetscape_Host.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0F3B555102B8D7C002231CB /* ZNetscape_Host.cpp */; }; @@ -99,7 +102,6 @@ C0F3B563102B8DA9002231CB /* ZAny.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0F3B561102B8DA9002231CB /* ZAny.cpp */; }; C0F3B564102B8DA9002231CB /* ZData_Any.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0F3B562102B8DA9002231CB /* ZData_Any.cpp */; }; C0F55259126D2C5200A34324 /* ZMacOSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C01176FB0F24E37400E7E01D /* ZMacOSX.cpp */; }; - C0F553DC126D3BDF00A34324 /* ZWorkerRunner_CFRunLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0F553DA126D3BDF00A34324 /* ZWorkerRunner_CFRunLoop.cpp */; }; C0F980AC1055F5590072462C /* ZWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0F980AB1055F5590072462C /* ZWorker.cpp */; }; C0F980B61055F5A70072462C /* ZStreamR_Boundary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C01177950F24E37500E7E01D /* ZStreamR_Boundary.cpp */; }; C0F980BB1055F5DC0072462C /* ZFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C01176D50F24E37400E7E01D /* ZFile.cpp */; }; @@ -119,7 +121,6 @@ C003F32F125F80D800C11A02 /* ZCountedWithoutFinalize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZCountedWithoutFinalize.cpp; path = zoolib/ZCountedWithoutFinalize.cpp; sourceTree = "<group>"; }; C005D15D11697C300055865A /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; }; C0086072118C84000097CFB3 /* ZCounted.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZCounted.cpp; path = zoolib/ZCounted.cpp; sourceTree = "<group>"; }; - C008607D118C84290097CFB3 /* ZWorkerRunner_Thread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZWorkerRunner_Thread.cpp; path = zoolib/ZWorkerRunner_Thread.cpp; sourceTree = "<group>"; }; C00B4FCA115ED0820009AB11 /* ZStreamerRWCon_SSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZStreamerRWCon_SSL.cpp; path = zoolib/ZStreamerRWCon_SSL.cpp; sourceTree = "<group>"; }; C00B4FCB115ED0820009AB11 /* ZStreamRWCon_SSL_OSX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZStreamRWCon_SSL_OSX.cpp; path = zoolib/ZStreamRWCon_SSL_OSX.cpp; sourceTree = "<group>"; }; C00B4FCC115ED0820009AB11 /* ZStreamRWCon_SSL_Win.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZStreamRWCon_SSL_Win.cpp; path = zoolib/ZStreamRWCon_SSL_Win.cpp; sourceTree = "<group>"; }; @@ -204,11 +205,15 @@ C0795FC9117D1021004124C3 /* ZNetscape_Guest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZNetscape_Guest.cpp; path = more/zoolib/netscape/ZNetscape_Guest.cpp; sourceTree = "<group>"; }; C07D2E4D1121E0EF003C0AED /* ZVal_Any.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZVal_Any.cpp; path = zoolib/ZVal_Any.cpp; sourceTree = "<group>"; }; C09C94900FB881B700959F95 /* FlashHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FlashHost.cpp; path = ../src/FlashHost.cpp; sourceTree = SOURCE_ROOT; }; + C0AF0B1413DF262F00C5661B /* ZCaller_CFRunLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZCaller_CFRunLoop.cpp; path = zoolib/ZCaller_CFRunLoop.cpp; sourceTree = "<group>"; }; + C0AF0B1513DF262F00C5661B /* ZUtil_string.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZUtil_string.cpp; path = zoolib/ZUtil_string.cpp; sourceTree = "<group>"; }; + C0AF0B1A13DF264000C5661B /* ZCaller_EventLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZCaller_EventLoop.cpp; path = zoolib/ZCaller_EventLoop.cpp; sourceTree = "<group>"; }; C0DA8E441268A2E6001E643C /* NSApplicationDelegate_FlashHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSApplicationDelegate_FlashHost.h; path = ../src/NSApplicationDelegate_FlashHost.h; sourceTree = SOURCE_ROOT; }; C0DA8E451268A2E6001E643C /* NSApplicationDelegate_FlashHost.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NSApplicationDelegate_FlashHost.mm; path = ../src/NSApplicationDelegate_FlashHost.mm; sourceTree = SOURCE_ROOT; }; C0DA8EAD1268A4E3001E643C /* ZObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZObjC.mm; path = zoolib/ZObjC.mm; sourceTree = "<group>"; }; C0DA8F6B1268AB15001E643C /* MainNib.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainNib.xib; sourceTree = "<group>"; }; C0E30E8312669AB100642353 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; + C0E49CF913C655BF00ED02FB /* ZCallScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZCallScheduler.cpp; path = zoolib/ZCallScheduler.cpp; sourceTree = "<group>"; }; C0F3B553102B8D7C002231CB /* ZNetscape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZNetscape.cpp; path = more/zoolib/netscape/ZNetscape.cpp; sourceTree = "<group>"; }; C0F3B554102B8D7C002231CB /* ZNetscape_GuestFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZNetscape_GuestFactory.cpp; path = more/zoolib/netscape/ZNetscape_GuestFactory.cpp; sourceTree = "<group>"; }; C0F3B555102B8D7C002231CB /* ZNetscape_Host.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZNetscape_Host.cpp; path = more/zoolib/netscape/ZNetscape_Host.cpp; sourceTree = "<group>"; }; @@ -217,8 +222,6 @@ C0F3B55E102B8D93002231CB /* ZNetscape_Host_Std.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZNetscape_Host_Std.cpp; path = more/zoolib/netscape/ZNetscape_Host_Std.cpp; sourceTree = "<group>"; }; C0F3B561102B8DA9002231CB /* ZAny.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZAny.cpp; path = zoolib/ZAny.cpp; sourceTree = "<group>"; }; C0F3B562102B8DA9002231CB /* ZData_Any.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZData_Any.cpp; path = zoolib/ZData_Any.cpp; sourceTree = "<group>"; }; - C0F553DA126D3BDF00A34324 /* ZWorkerRunner_CFRunLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZWorkerRunner_CFRunLoop.cpp; path = zoolib/ZWorkerRunner_CFRunLoop.cpp; sourceTree = "<group>"; }; - C0F553DB126D3BDF00A34324 /* ZWorkerRunner_CFRunLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZWorkerRunner_CFRunLoop.h; path = zoolib/ZWorkerRunner_CFRunLoop.h; sourceTree = "<group>"; }; C0F980AB1055F5590072462C /* ZWorker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZWorker.cpp; path = zoolib/ZWorker.cpp; sourceTree = "<group>"; }; C0F981011056D3040072462C /* FlashHost_Main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = FlashHost_Main.mm; path = ../src/FlashHost_Main.mm; sourceTree = "<group>"; }; /* End PBXFileReference section */ @@ -299,6 +302,9 @@ C0F3B561102B8DA9002231CB /* ZAny.cpp */, C01176740F24E37400E7E01D /* ZAtomic.cpp */, C011768E0F24E37400E7E01D /* ZByteSwap.cpp */, + C0AF0B1413DF262F00C5661B /* ZCaller_CFRunLoop.cpp */, + C0AF0B1A13DF264000C5661B /* ZCaller_EventLoop.cpp */, + C0E49CF913C655BF00ED02FB /* ZCallScheduler.cpp */, C01176900F24E37400E7E01D /* ZCommandLine.cpp */, C01176940F24E37400E7E01D /* ZCompare.cpp */, C0406DC611E4D3880000291D /* ZCompare_Integer.cpp */, @@ -384,13 +390,11 @@ C04ACF6910953A4B00BCCD3A /* ZUtil_POSIXFD.cpp */, C011786B0F24E37500E7E01D /* ZUtil_Strim.cpp */, C0768B7413AB76E8008968F6 /* ZUtil_Strim_Operators.cpp */, + C0AF0B1513DF262F00C5661B /* ZUtil_string.cpp */, C01178800F24E37500E7E01D /* ZUtil_Time.cpp */, C011788A0F24E37500E7E01D /* ZUtil_Win.cpp */, C07D2E4D1121E0EF003C0AED /* ZVal_Any.cpp */, C0F980AB1055F5590072462C /* ZWorker.cpp */, - C0F553DA126D3BDF00A34324 /* ZWorkerRunner_CFRunLoop.cpp */, - C0F553DB126D3BDF00A34324 /* ZWorkerRunner_CFRunLoop.h */, - C008607D118C84290097CFB3 /* ZWorkerRunner_Thread.cpp */, ); name = cxx; path = ../../../zoolib/source/cxx; @@ -548,7 +552,6 @@ C0795FCA117D1021004124C3 /* ZNetscape_Guest_Std.cpp in Sources */, C0795FCB117D1021004124C3 /* ZNetscape_Guest.cpp in Sources */, C0086073118C84000097CFB3 /* ZCounted.cpp in Sources */, - C008607E118C84290097CFB3 /* ZWorkerRunner_Thread.cpp in Sources */, C0406DC711E4D3880000291D /* ZCompare_Integer.cpp in Sources */, C0406DCC11E4D3950000291D /* ZCompare_String.cpp in Sources */, C003F330125F80D800C11A02 /* ZCountedWithoutFinalize.cpp in Sources */, @@ -557,11 +560,14 @@ C0DA8E461268A2E6001E643C /* NSApplicationDelegate_FlashHost.mm in Sources */, C0DA8EAE1268A4E3001E643C /* ZObjC.mm in Sources */, C0F55259126D2C5200A34324 /* ZMacOSX.cpp in Sources */, - C0F553DC126D3BDF00A34324 /* ZWorkerRunner_CFRunLoop.cpp in Sources */, C0768B6713AB7688008968F6 /* ZRef_CF.cpp in Sources */, C0768B6813AB7688008968F6 /* ZUtil_CF.cpp in Sources */, C0768B7513AB76E8008968F6 /* ZUtil_Strim_Operators.cpp in Sources */, C0768B7913AB76FA008968F6 /* ZCompare_Real.cpp in Sources */, + C0E49CFA13C655BF00ED02FB /* ZCallScheduler.cpp in Sources */, + C0AF0B1613DF262F00C5661B /* ZCaller_CFRunLoop.cpp in Sources */, + C0AF0B1713DF262F00C5661B /* ZUtil_string.cpp in Sources */, + C0AF0B1B13DF264000C5661B /* ZCaller_EventLoop.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: trunk/zoolib_samples/FlashHost/src/FlashHost.cpp =================================================================== --- trunk/zoolib_samples/FlashHost/src/FlashHost.cpp 2012-01-11 21:28:20 UTC (rev 2672) +++ trunk/zoolib_samples/FlashHost/src/FlashHost.cpp 2012-01-11 21:31:41 UTC (rev 2673) @@ -16,7 +16,6 @@ namespace net_em { -using std::multimap; using std::set; using std::string; using std::vector; @@ -30,14 +29,12 @@ #pragma mark - #pragma mark * spTryLoadGF -static ZRef<ZNetscape::GuestFactory> spTryLoadGF(const string& iPath) +static ZRef<ZNetscape::GuestFactory> spTryLoadGF(ZQ<int> iEarliest, ZQ<int> iLatest, const string& iPath) { - try - { - return ZNetscape::sMakeGuestFactory(iPath); - } + try { return ZNetscape::sMakeGuestFactory(iEarliest, iLatest, iPath); } catch (...) {} + return null; } @@ -99,10 +96,10 @@ static Val spTrail(const Val& iVal, const ZTrail& iTrail) { - Val curVal = iVal; + ZQ<Val> curVal = iVal; for (size_t x = 0; curVal && x < iTrail.Count(); ++x) - curVal = curVal.GetKeyRef().Get(iTrail.At(x)); - return curVal; + curVal = curVal->GetKeyRef().QGet(iTrail.At(x)); + return *curVal; } static ZQ<ZTrail> spGetTrailAt(const Val& iRoot, const ZTrail& iTrail) @@ -181,48 +178,15 @@ return result; } -static uint64 spGetVersionNumber(const string16& iPath) +static ZRef<ZNetscape::GuestFactory> spLoadWindows(ZQ<int> iEarliest, ZQ<int> iLatest) { - DWORD dummy; - if (DWORD theSize = ::GetFileVersionInfoSizeW(const_cast<WCHAR*>(iPath.c_str()), &dummy)) - { - vector<char> buffer(theSize); - if (::GetFileVersionInfoW(const_cast<WCHAR*>(iPath.c_str()), 0, theSize, &buffer[0])) - { - VS_FIXEDFILEINFO* info; - UINT infoSize; - if (::VerQueryValueW(&buffer[0], const_cast<WCHAR*>(L"\\"), (void**)&info, &infoSize) - && infoSize >= sizeof(VS_FIXEDFILEINFO)) - { - return uint64(info->dwFileVersionLS) | uint64(info->dwFileVersionMS) << 32; - } - } - } - return 0; - } - -static uint64 spGetVersionNumber(const ZTrail& iTrail) - { return spGetVersionNumber(ZUnicode::sAsUTF16(spTrailAsWin(iTrail))); } - -static ZRef<ZNetscape::GuestFactory> spLoadWindows(uint64& oVersion) - { - set<ZTrail> candidates = spGenerateCandidates(); - - multimap<uint64, ZTrail> theMap; + const set<ZTrail> candidates = spGenerateCandidates(); for (set<ZTrail>::const_iterator i = candidates.begin(); i != candidates.end(); ++i) { - const ZTrail theTrail = *i; - if (const uint64 theVer = spGetVersionNumber(theTrail)) - theMap.insert(std::make_pair(theVer, theTrail)); - } - - for (multimap<uint64, ZTrail>::reverse_iterator i = theMap.rbegin(); i != theMap.rend(); ++i) - { - if (ZRef<ZNetscape::GuestFactory> theGF = spTryLoadGF(spTrailAsWin(i->second))) + if (ZRef<ZNetscape::GuestFactory> theGF = spTryLoadGF(iEarliest, iLatest, spTrailAsWin(*i))) { if (ZLOGF(s, ePriority_Info)) - s << "Using file: " << i->second.AsString(); - oVersion = i->first; + s << "Using file: " << i->AsString(); return theGF; } } @@ -236,40 +200,41 @@ #pragma mark - #pragma mark * sLoadGF -ZRef<ZNetscape::GuestFactory> sLoadGF(uint64& oVersion, const string* iNativePaths, size_t iCount) +ZRef<ZNetscape::GuestFactory> sLoadGF + (ZQ<int> iEarliest, ZQ<int> iLatest, const string* iNativePaths, size_t iCount) { - oVersion = 0; for (size_t x = 0; x < iCount; ++x) { const string& thePath = iNativePaths[x]; if (thePath.size()) { - if (ZRef<ZNetscape::GuestFactory> theGF = spTryLoadGF(thePath)) - { - #if ZCONFIG_SPI_Enabled(Win) - oVersion = spGetVersionNumber(ZUnicode::sAsUTF16(thePath)); - #endif + if (ZRef<ZNetscape::GuestFactory> theGF = spTryLoadGF(iEarliest, iLatest, thePath)) return theGF; - } } } + ZRef<ZNetscape::GuestFactory> theGF; + #if ZCONFIG_SPI_Enabled(Win) - if (ZRef<ZNetscape::GuestFactory> theGF = spLoadWindows(oVersion)) + if (ZRef<ZNetscape::GuestFactory> theGF = spLoadWindows(iEarliest, iLatest)) return theGF; #endif // ZCONFIG_SPI_Enabled(Win) #if ZCONFIG_SPI_Enabled(Carbon64) - string thePath = spFindFolder(kUserDomain, kInternetPlugInFolderType) + "/Flash Player.plugin"; - if (ZRef<ZNetscape::GuestFactory> theGF = spTryLoadGF(thePath)) + if (ZRef<ZNetscape::GuestFactory> theGF = + spTryLoadGF(iEarliest, iLatest, spFindFolder(kUserDomain, kInternetPlugInFolderType) + "/Flash Player.plugin")) + { return theGF; + } - thePath = spFindFolder(kLocalDomain, kInternetPlugInFolderType) + "/Flash Player.plugin"; - if (ZRef<ZNetscape::GuestFactory> theGF = spTryLoadGF(thePath)) + if (ZRef<ZNetscape::GuestFactory> theGF = + spTryLoadGF(iEarliest, iLatest, spFindFolder(kLocalDomain, kInternetPlugInFolderType) + "/Flash Player.plugin")) + { return theGF; + } #endif // ZCONFIG_SPI_Enabled(Carbon64) Modified: trunk/zoolib_samples/FlashHost/src/FlashHost.h =================================================================== --- trunk/zoolib_samples/FlashHost/src/FlashHost.h 2012-01-11 21:28:20 UTC (rev 2672) +++ trunk/zoolib_samples/FlashHost/src/FlashHost.h 2012-01-11 21:31:41 UTC (rev 2673) @@ -13,7 +13,8 @@ using ZNetscape::NPVariantH; using std::string; -ZRef<ZNetscape::GuestFactory> sLoadGF(uint64& oVersion, const std::string* iNativePaths, size_t iCount); +ZRef<ZNetscape::GuestFactory> sLoadGF + (ZQ<int> iEarliest, ZQ<int> iLatest, const std::string* iNativePaths, size_t iCount); // ================================================================================================= #pragma mark - Modified: trunk/zoolib_samples/FlashHost/src/FlashHost_Main.cpp =================================================================== --- trunk/zoolib_samples/FlashHost/src/FlashHost_Main.cpp 2012-01-11 21:28:20 UTC (rev 2672) +++ trunk/zoolib_samples/FlashHost/src/FlashHost_Main.cpp 2012-01-11 21:31:41 UTC (rev 2673) @@ -6,7 +6,7 @@ #include "zoolib/ZStdIO.h" #include "zoolib/ZStrim_Stream.h" #include "zoolib/ZStrimmer_Streamer.h" -#include "zoolib/ZUtil_CFType.h" +#include "zoolib/ZUtil_CF.h" #include "zoolib/ZUtil_Debug.h" #include "zoolib/ZUtil_STL_vector.h" #include "zoolib/ZWND.h" @@ -105,7 +105,7 @@ if (iCompositing) title += "/Compositing"; - ::SetWindowTitleWithCFString(theWindowRef, ZUtil_CFType::sString(title)); + ::SetWindowTitleWithCFString(theWindowRef, ZUtil_CF::sString(title)); ::ShowWindow(theWindowRef); ::BringToFront(theWindowRef); Modified: trunk/zoolib_samples/FlashHost/src/FlashHost_Main.mm =================================================================== --- trunk/zoolib_samples/FlashHost/src/FlashHost_Main.mm 2012-01-11 21:28:20 UTC (rev 2672) +++ trunk/zoolib_samples/FlashHost/src/FlashHost_Main.mm 2012-01-11 21:31:41 UTC (rev 2673) @@ -9,7 +9,7 @@ #include "zoolib/ZStrimmer_Streamer.h" #include "zoolib/ZUtil_CF.h" #include "zoolib/ZUtil_Debug.h" -#include "zoolib/ZUtil_STL.h" +#include "zoolib/ZUtil_STL_vector.h" #include "zoolib/ZUtil_Strim_Operators.h" #include "zoolib/ZWND.h" @@ -179,9 +179,7 @@ , fLogFile("--logfile", "Log: name of file to write log messages to", "-") , fURL("--url", "URL from which to load an swf", "http://127.0.0.1/~ag/form1easy.swf") -// "http://surfer.em.net/~ag/form1easy.swf") // "http://www.tizag.com/pics/flash/form1easy.swf") -// "http://www.adobe.com/devnet/flash/samples/game_2/2_amoebas.swf") // "http://www.adobe.com/content/dotcom/en/devnet/actionscript/samples/game_2/_jcr_content/articlecontentAdobe/generic/file.res/2_amoebas%5b1%5d.swf") , fFlashLib("--flashlib", "File from which to load the flash plugin", "./NPSWF32.dll") {} @@ -247,6 +245,10 @@ if (const ZLog::S& s = ZLog::S(ZLog::ePriority_Info, "ZMain")) s.Writef("Starting"); + #if ZCONFIG_SPI_Enabled(Cocoa) + ZAutoreleasePool thePool; + #endif // ZCONFIG_SPI_Enabled(Cocoa) + uint64 theVersion; ZRef<ZNetscape::GuestFactory> theGF = net_em::sLoadGF(theVersion, &cmd.fFlashLib(), 1); if (!theGF) @@ -256,6 +258,12 @@ } + if (ZQ<int> theVersion = theGF->GetMajorVersion()) + { + if (ZLOGF(s, eDebug)) + s << *theVersion; + } + const string theMIME = "application/x-shockwave-flash"; const string theURL = cmd.fURL(); @@ -276,7 +284,7 @@ theParams.push_back(Param_t("wmode", "transparent")); } - #if 0 && ZCONFIG_SPI_Enabled(Carbon) + #if 1 && ZCONFIG_SPI_Enabled(Carbon) for (int useWindowRef = 0; useWindowRef < 2; ++useWindowRef) { for (int useAllowCG = 0; useAllowCG < 2; ++useAllowCG) @@ -288,8 +296,9 @@ if (!useCompositing && !useWindowRef) continue; -// if (useCompositing || !useWindowRef || useAllowCG) - if (!useCompositing || useWindowRef || !useAllowCG) + if (useCompositing || !useWindowRef || useAllowCG) +// if (!useCompositing || useWindowRef || !useAllowCG) +// if (!useAllowCG) continue; ZNetscape::Host_Std* theFlashHost @@ -313,7 +322,7 @@ // ----- - #if 0 && ZCONFIG_SPI_Enabled(Carbon) + #if 1 && ZCONFIG_SPI_Enabled(Carbon) ::RunApplicationEventLoop(); @@ -330,7 +339,6 @@ #else - ZAutoreleasePool thePool; extern ZRef<ZNetscape::GuestFactory> sharedGF; sharedGF = theGF; Modified: trunk/zoolib_samples/FlashHost/src/NSApplicationDelegate_FlashHost.mm =================================================================== --- trunk/zoolib_samples/FlashHost/src/NSApplicationDelegate_FlashHost.mm 2012-01-11 21:28:20 UTC (rev 2672) +++ trunk/zoolib_samples/FlashHost/src/NSApplicationDelegate_FlashHost.mm 2012-01-11 21:31:41 UTC (rev 2673) @@ -2,6 +2,8 @@ #if ZCONFIG_SPI_Enabled(Cocoa) +#import <AppKit/NSScreen.h> + #include "FlashHost_Cocoa.h" #include "zoolib/ZUtil_STL_vector.h" @@ -27,8 +29,10 @@ - (void) awakeFromNib { + ZGRectf iBounds(0, 44, 400, 300); + fWindow = [[NSWindow alloc] - initWithContentRect:ZGRectf(0, 0, 400, 300) + initWithContentRect:iBounds.FlippedY([[[NSScreen screens] objectAtIndex:0] frame].size.height) styleMask:NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask backing:NSBackingStoreBuffered defer:NO]; @@ -42,7 +46,8 @@ FlashHost_Cocoa* theHost = new FlashHost_Cocoa(sharedGF, theView); const string theMIME = "application/x-shockwave-flash"; - const string theURL = "http://www.em.net/fl_64/form1easy.swf"; + const string theURL = "http://www.adobe.com/content/dotcom/en/devnet/actionscript/samples/game_2/_jcr_content/articlecontentAdobe/generic/file.res/2_amoebas%5b1%5d.swf"; +// const string theURL = "http://www.em.net/fl_64/form1easy.swf"; typedef ZNetscape::Host_Std::Param_t Param_t; vector<Param_t> theParams; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-11 21:28:26
|
Revision: 2672 http://zoolib.svn.sourceforge.net/zoolib/?rev=2672&view=rev Author: agreen Date: 2012-01-11 21:28:20 +0000 (Wed, 11 Jan 2012) Log Message: ----------- Look for version number under different key, really only valid with Flash. Modified Paths: -------------- trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_GuestFactory.cpp Modified: trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_GuestFactory.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_GuestFactory.cpp 2012-01-11 21:27:58 UTC (rev 2671) +++ trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_GuestFactory.cpp 2012-01-11 21:28:20 UTC (rev 2672) @@ -145,15 +145,17 @@ return null; } +// Note that the use of CFBundleShortVersionString here is because it's where Flash +// reliably puts a usable major version number. + ZQ<int> spQGetMajorVersion(const ZMap_CF& iMap) - { return spQGetMajorVersion(iMap.Get(kCFBundleVersionKey).GetCFString()); } + { return spQGetMajorVersion(iMap.Get(CFSTR("CFBundleShortVersionString")).GetCFString()); } ZQ<int> spQGetMajorVersion(const ZRef<CFBundleRef>& iBundleRef) { if (iBundleRef) { - if (ZRef<CFStringRef> theStringRef = - (CFStringRef)::CFBundleGetValueForInfoDictionaryKey(iBundleRef, kCFBundleVersionKey)) + if (ZRef<CFStringRef> theStringRef = (CFStringRef)::CFBundleGetValueForInfoDictionaryKey(iBundleRef, CFSTR("CFBundleShortVersionString"))) { return spQGetMajorVersion(theStringRef); } } return null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-11 21:28:09
|
Revision: 2671 http://zoolib.svn.sourceforge.net/zoolib/?rev=2671&view=rev Author: agreen Date: 2012-01-11 21:27:58 +0000 (Wed, 11 Jan 2012) Log Message: ----------- Simplify sCog_Each. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-10 17:16:21 UTC (rev 2670) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-11 21:27:58 UTC (rev 2671) @@ -499,11 +499,7 @@ ZCog<Param> sCog_Each (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { - if (sIsFinished(iCallable0)) - return iCallable1; - return +iCallable0 >> iCallable1; - } + { return +iCallable0 >> iCallable1; } template <class Param> ZCog<Param> operator^ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-10 17:16:32
|
Revision: 2670 http://zoolib.svn.sourceforge.net/zoolib/?rev=2670&view=rev Author: agreen Date: 2012-01-10 17:16:21 +0000 (Tue, 10 Jan 2012) Log Message: ----------- Simplify sCog_Each. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-10 05:24:58 UTC (rev 2669) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-10 17:16:21 UTC (rev 2670) @@ -500,13 +500,9 @@ (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - if (sIsPending(iCallable0)) - { - if (sIsPending(iCallable1)) - return +iCallable0 >> iCallable1; - return iCallable0; - } - return iCallable1; + if (sIsFinished(iCallable0)) + return iCallable1; + return +iCallable0 >> iCallable1; } template <class Param> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-10 05:25:04
|
Revision: 2669 http://zoolib.svn.sourceforge.net/zoolib/?rev=2669&view=rev Author: agreen Date: 2012-01-10 05:24:58 +0000 (Tue, 10 Jan 2012) Log Message: ----------- Tweaks. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-10 04:54:04 UTC (rev 2668) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-10 05:24:58 UTC (rev 2669) @@ -108,13 +108,18 @@ //-- - static ZCog sFalse() - { return null; } - + static const ZCog& sFalse(); static const ZCog& sTrue(); }; template <class Param> +const ZCog<Param>& ZCog<Param>::sFalse() + { + static const ZCog<Param> spCog; + return spCog; + } + +template <class Param> ZCog<Param> spCogFun_True(const ZCog<Param>& iSelf, Param iParam) { // Shouldn't ever call this. @@ -366,16 +371,15 @@ ZCog<Param> spCogFun_Repeat(const ZCog<Param>& iSelf, Param iParam, const ZCog<Param>& iCog_Init, const ZCog<Param>& iCog) { - ZCog<Param> lCog = iCog; - - if (sCallPendingCog_Unchanged(lCog, iParam)) + ZCog<Param> newCog = iCog; + if (sCallPendingCog_Unchanged(newCog, iParam)) return iSelf; - if (sIsFalse(lCog)) + if (sIsFalse(newCog)) return false; - if (not sIsTrue(lCog)) - return spCog_Repeat(iCog_Init, lCog); + if (not sIsTrue(newCog)) + return spCog_Repeat(iCog_Init, newCog); // To get unbroken repetition on hitting a term we need to call the new cog, // don't make the call if we'd just be calling an iSelf-equivalent. @@ -436,9 +440,9 @@ if (sIsTrue(lCog)) { - if (sIsPending(iCog1)) - return iCog1->Call(iCog1, iParam); - return iCog1; + if (sIsFinished(iCog1)) + return iCog1; + return iCog1->Call(iCog1, iParam); } return spCog_Then(lCog, iCog1); @@ -564,17 +568,17 @@ if (sIsFalse(iCog1)) return false; - ZCog<Param> lCog1 = iCog1; - if (sCallPendingCog_Unchanged(lCog1, iParam)) + ZCog<Param> newCog1 = iCog1; + if (sCallPendingCog_Unchanged(newCog1, iParam)) return iSelf; - if (sIsFalse(lCog1)) + if (sIsFalse(newCog1)) return false; - if (sIsTrue(lCog1)) + if (sIsTrue(newCog1)) return lCog0; - return spCog_And(lCog0, lCog1); + return spCog_And(lCog0, newCog1); } else if (sIsFalse(lCog0)) { @@ -598,11 +602,11 @@ if (sIsTrue(iCog1)) return lCog0; - if (ZCog<Param> lCog1 = iCog1->Call(iCog1, iParam)) + if (ZCog<Param> newCog1 = iCog1->Call(iCog1, iParam)) { - if (sIsTrue(lCog1)) + if (sIsTrue(newCog1)) return lCog0; - return spCog_And(lCog0, lCog1); + return spCog_And(lCog0, newCog1); } return false; @@ -668,17 +672,17 @@ if (sIsTrue(iCog1)) return true; - ZCog<Param> lCog1 = iCog1; - if (sCallPendingCog_Unchanged(lCog1, iParam)) + ZCog<Param> newCog1 = iCog1; + if (sCallPendingCog_Unchanged(newCog1, iParam)) return iSelf; - if (sIsFalse(lCog1)) + if (sIsFalse(newCog1)) return lCog0; - if (sIsTrue(lCog1)) + if (sIsTrue(newCog1)) return true; - return spCog_Or(lCog0, lCog1); + return spCog_Or(lCog0, newCog1); } else if (sIsFalse(lCog0)) { @@ -696,11 +700,11 @@ if (sIsTrue(iCog1)) return true; - if (ZCog<Param> lCog1 = iCog1->Call(iCog1, iParam)) + if (ZCog<Param> newCog1 = iCog1->Call(iCog1, iParam)) { - if (sIsTrue(lCog1)) + if (sIsTrue(newCog1)) return true; - return spCog_Or(lCog0, lCog1); + return spCog_Or(lCog0, newCog1); } return lCog0; @@ -727,7 +731,7 @@ template <class Param> ZCog<Param> spCogFun_With(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1); + ZCog<Param> lCog0, const ZCog<Param>& iCog1); template <class Param> ZCog<Param> spCog_With @@ -752,33 +756,33 @@ template <class Param> ZCog<Param> spCogFun_With(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1) + ZCog<Param> lCog0, const ZCog<Param>& iCog1) { - ZAssert(sIsPending(iCog0) && sIsPending(iCog1)); + ZAssert(sIsPending(lCog0) && sIsPending(iCog1)); - ZCog<Param> newCog0 = iCog0; - if (sCallPendingCog_Unchanged(newCog0, iParam)) + if (sCallPendingCog_Unchanged(lCog0, iParam)) { ZCog<Param> newCog1 = iCog1; if (sCallPendingCog_Unchanged(newCog1, iParam)) return iSelf; if (sIsFinished(newCog1)) - return newCog0; + return lCog0; - return spCog_With(newCog0, newCog1); + return spCog_With(lCog0, newCog1); } - else if (sIsPending(newCog0)) + else if (sIsPending(lCog0)) { ZCog<Param> newCog1 = iCog1->Call(iCog1, iParam); - if (sIsPending(newCog1)) - return spCog_With(newCog0, newCog1); - return newCog0; + if (sIsFinished(newCog1)) + return lCog0; + + return spCog_With(lCog0, newCog1); } else { - return newCog0; + return lCog0; } } @@ -802,7 +806,7 @@ template <class Param> ZCog<Param> spCogFun_WithUnchanged(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1); + ZCog<Param> lCog0, const ZCog<Param>& iCog1); template <class Param> ZCog<Param> spCog_WithUnchanged @@ -827,23 +831,21 @@ template <class Param> ZCog<Param> spCogFun_WithUnchanged(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1) + ZCog<Param> lCog0, const ZCog<Param>& iCog1) { - ZAssert(sIsPending(iCog0) && sIsPending(iCog1)); + ZAssert(sIsPending(lCog0) && sIsPending(iCog1)); - ZCog<Param> newCog0 = iCog0; - if (sCallPendingCog_Changed(newCog0, iParam)) - return newCog0; + if (sCallPendingCog_Changed(lCog0, iParam)) + return lCog0; ZCog<Param> newCog1 = iCog1; - if (sCallPendingCog_Changed(newCog1, iParam)) - { - if (sIsPending(newCog1)) - return spCog_WithUnchanged(newCog0, newCog1); - return newCog0; - } + if (sCallPendingCog_Unchanged(newCog1, iParam)) + return iSelf; - return iSelf; + if (sIsFinished(newCog1)) + return lCog0; + + return spCog_WithUnchanged(lCog0, newCog1); } template <class Param> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-10 04:54:10
|
Revision: 2668 http://zoolib.svn.sourceforge.net/zoolib/?rev=2668&view=rev Author: agreen Date: 2012-01-10 04:54:04 +0000 (Tue, 10 Jan 2012) Log Message: ----------- Not using this. Removed Paths: ------------- trunk/zoolib/source/cxx/zoolib/ZCog_Std.h Deleted: trunk/zoolib/source/cxx/zoolib/ZCog_Std.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog_Std.h 2012-01-10 04:44:56 UTC (rev 2667) +++ trunk/zoolib/source/cxx/zoolib/ZCog_Std.h 2012-01-10 04:54:04 UTC (rev 2668) @@ -1,91 +0,0 @@ -/* ------------------------------------------------------------------------------------------------- -Copyright (c) 2011 Andrew Green -http://www.zoolib.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING -BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES -OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------------------------- */ - -#ifndef __ZCog_Std_h__ -#define __ZCog_Std_h__ 1 - -#include "zoolib/ZCog.h" -#include "zoolib/ZTime.h" - -namespace ZooLib { - -// ================================================================================================= -#pragma mark - -#pragma mark * sCog_DelayUntil - -template <class Param> -ZCog<Param> spCogFun_DelayUntil(const ZCog<Param>& iSelf, Param iParam, - ZTime iSystemTime) - { - if (ZTime::sSystem() > iSystemTime) - return true; - return iSelf; - } - -template <class Param> -ZCog<Param> sCog_DelayUntil(ZTime iSystemTime) - { - static ZMACRO_auto(spCallable, sCallable(spCogFun_DelayUntil<Param>)); - return sBindR(spCallable, iSystemTime); - } - -// ================================================================================================= -#pragma mark - -#pragma mark * sCog_DelayFor - -template <class Param> -ZCog<Param> spCogFun_DelayFor(const ZCog<Param>& iSelf, Param iParam, - double iDelay) - { return sCallCog(sCog_DelayUntil<Param>(ZTime::sSystem() + iDelay), iParam); } - -template <class Param> -ZCog<Param> sCog_DelayFor(double iDelay) - { - static ZMACRO_auto(spCallable, sCallable(spCogFun_DelayFor<Param>)); - return sBindR(spCallable, iDelay); - } - -// ================================================================================================= -#pragma mark - -#pragma mark * sCog_StartAt, sCog_StopAt, sCog_StartAfter, sCog_StopAfter - -template <class Param> -ZCog<Param> sCog_StartAt(ZTime iSystemTime, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) - { return sCog_DelayUntil<Param>(iSystemTime) >> iCallable; } - -template <class Param> -ZCog<Param> sCog_StopAt(ZTime iSystemTime, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) - { return sCog_DelayUntil<Param>(iSystemTime) | iCallable; } - -template <class Param> -ZCog<Param> sCog_StartAfter(double iDelay, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >iCallable) - { return sCog_DelayFor<Param>(iDelay) >> iCallable; } - -template <class Param> -ZCog<Param> sCog_StopAfter(double iDelay, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >iCallable) - { return sCog_DelayFor<Param>(iDelay) | iCallable; } - -} // namespace ZooLib - -#endif // __ZCog_Std_h__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-10 04:45:03
|
Revision: 2667 http://zoolib.svn.sourceforge.net/zoolib/?rev=2667&view=rev Author: agreen Date: 2012-01-10 04:44:56 +0000 (Tue, 10 Jan 2012) Log Message: ----------- Comment. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-10 04:43:22 UTC (rev 2666) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-10 04:44:56 UTC (rev 2667) @@ -415,7 +415,7 @@ // ================================================================================================= #pragma mark - -#pragma mark * Binary linear, sCog_Then +#pragma mark * Binary sequential, sCog_Then // Call cog0 till it finishes, if true then call cog1 @@ -487,7 +487,7 @@ // ================================================================================================= #pragma mark - -#pragma mark * Binary linear, sCog_Each +#pragma mark * Binary sequential, sCog_Each // Call cog0 till it finishes, then call cog1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-10 04:43:29
|
Revision: 2666 http://zoolib.svn.sourceforge.net/zoolib/?rev=2666&view=rev Author: agreen Date: 2012-01-10 04:43:22 +0000 (Tue, 10 Jan 2012) Log Message: ----------- The Finish was broken if we had no content. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZYad_ML.cpp Modified: trunk/zoolib/source/cxx/zoolib/ZYad_ML.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZYad_ML.cpp 2012-01-09 20:32:16 UTC (rev 2665) +++ trunk/zoolib/source/cxx/zoolib/ZYad_ML.cpp 2012-01-10 04:43:22 UTC (rev 2666) @@ -64,7 +64,7 @@ {} void ZYadStrimR_ML::Finish() - { fStrimmerU->GetStrim().Advance(); } + { sSkipText(fStrimmerU->GetStrim()); } const ZStrimR& ZYadStrimR_ML::GetStrimR() { return fStrimmerU->GetStrimR(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-09 20:32:22
|
Revision: 2665 http://zoolib.svn.sourceforge.net/zoolib/?rev=2665&view=rev Author: agreen Date: 2012-01-09 20:32:16 +0000 (Mon, 09 Jan 2012) Log Message: ----------- Some cleanup. Lose the accumulators -- And-types need more work. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-09 20:06:48 UTC (rev 2664) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-09 20:32:16 UTC (rev 2665) @@ -200,16 +200,16 @@ { return sCompareAndSet(ioCog, ioCog->Call(ioCog, iParam)); } template <class Cog> -bool sCallCog_Changed(Cog& ioCog, const typename Cog::Param iParam) - { return sIsPending(ioCog) && sCompareAndSet(ioCog, ioCog->Call(ioCog, iParam)); } - -template <class Cog> bool sCallPendingCog_Unchanged(Cog& ioCog, const typename Cog::Param iParam) { return not sCompareAndSet(ioCog, ioCog->Call(ioCog, iParam)); } template <class Cog> +bool sCallCog_Changed(Cog& ioCog, const typename Cog::Param iParam) + { return sIsPending(ioCog) && sCallPendingCog_Changed(ioCog, iParam); } + +template <class Cog> bool sCallCog_Unchanged(Cog& ioCog, const typename Cog::Param iParam) - { return sIsFinished(ioCog) || not sCompareAndSet(ioCog, ioCog->Call(ioCog, iParam)); } + { return sIsFinished(ioCog) || sCallPendingCog_Unchanged(ioCog, iParam); } // ================================================================================================= #pragma mark - @@ -226,7 +226,7 @@ if (sCallPendingCog_Unchanged(lCog, iParam)) return iSelf; - if (not lCog) + if (sIsFalse(lCog)) return true; if (sIsTrue(lCog)) @@ -239,7 +239,8 @@ ZCog<Param> spCog_Not (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { - ZAssert(iCallable && not sIsTrue(iCallable)); + ZAssert(sIsPending(iCallable)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_Not<Param>)); return sBindR(spCallable, iCallable); } @@ -248,7 +249,7 @@ ZCog<Param> sCog_Not (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { - if (not iCallable) + if (sIsFalse(iCallable)) return true; if (sIsTrue(iCallable)) @@ -277,7 +278,7 @@ if (sCallPendingCog_Unchanged(lCog, iParam)) return iSelf; - if (not lCog || sIsTrue(lCog)) + if (sIsFinished(lCog)) return true; return spCog_Tautology(lCog); @@ -287,7 +288,8 @@ ZCog<Param> spCog_Tautology (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { - ZAssert(iCallable && not sIsTrue(iCallable)); + ZAssert(sIsPending(iCallable)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_Tautology<Param>)); return sBindR(spCallable, iCallable); } @@ -296,7 +298,7 @@ ZCog<Param> sCog_Tautology (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { - if (not iCallable || sIsTrue(iCallable)) + if (sIsFinished(iCallable)) return true; return spCog_Tautology(iCallable); @@ -321,7 +323,7 @@ if (sCallPendingCog_Unchanged(lCog, iParam)) return iSelf; - if (not lCog || sIsTrue(lCog)) + if (sIsFinished(lCog)) return false; return spCog_Contradiction(lCog); @@ -331,7 +333,8 @@ ZCog<Param> spCog_Contradiction (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { - ZAssert(iCallable && not sIsTrue(iCallable)); + ZAssert(sIsPending(iCallable)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_Contradiction<Param>)); return sBindR(spCallable, iCallable); } @@ -340,7 +343,7 @@ ZCog<Param> sCog_Contradiction (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { - if (not iCallable || sIsTrue(iCallable)) + if (sIsFinished(iCallable)) return false; return spCog_Contradiction(iCallable); @@ -368,7 +371,7 @@ if (sCallPendingCog_Unchanged(lCog, iParam)) return iSelf; - if (not lCog) + if (sIsFalse(lCog)) return false; if (not sIsTrue(lCog)) @@ -388,6 +391,7 @@ const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { ZAssert(iCallable_Init && iCallable); + static ZMACRO_auto(spCallable, sCallable(spCogFun_Repeat<Param>)); return sBindR(spCallable, iCallable_Init, iCallable); } @@ -396,7 +400,7 @@ ZCog<Param> sCog_Repeat (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { - if (not iCallable) + if (sIsFalse(iCallable)) return false; if (sIsTrue(iCallable)) @@ -411,7 +415,7 @@ // ================================================================================================= #pragma mark - -#pragma mark * Binary sequential, sCog_Then +#pragma mark * Binary linear, sCog_Then // Call cog0 till it finishes, if true then call cog1 @@ -432,7 +436,7 @@ if (sIsTrue(lCog)) { - if (iCog1 && not sIsTrue(iCog1)) + if (sIsPending(iCog1)) return iCog1->Call(iCog1, iParam); return iCog1; } @@ -483,6 +487,38 @@ // ================================================================================================= #pragma mark - +#pragma mark * Binary linear, sCog_Each + +// Call cog0 till it finishes, then call cog1 + +template <class Param> +ZCog<Param> sCog_Each + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, + const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) + { + if (sIsPending(iCallable0)) + { + if (sIsPending(iCallable1)) + return +iCallable0 >> iCallable1; + return iCallable0; + } + return iCallable1; + } + +template <class Param> +ZCog<Param> operator^ + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, + const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) + { return sCog_Each<Param>(iCallable0, iCallable1); } + +template <class Param> +ZCog<Param>& operator^= + (ZCog<Param>& ioCog0, + const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) + { return ioCog0 = ioCog0 ^ iCallable1; } + +// ================================================================================================= +#pragma mark - #pragma mark * Binary parallel, sCog_And template <class Param> @@ -495,6 +531,7 @@ const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { ZAssert(sIsPending(iCallable0) && not sIsTrue(iCallable1)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_And<Param>)); return sBindR(spCallable, iCallable0, iCallable1); } @@ -524,14 +561,14 @@ if (sCallPendingCog_Unchanged(lCog0, iParam)) { - if (not iCog1) + if (sIsFalse(iCog1)) return false; ZCog<Param> lCog1 = iCog1; if (sCallPendingCog_Unchanged(lCog1, iParam)) return iSelf; - if (not lCog1) + if (sIsFalse(lCog1)) return false; if (sIsTrue(lCog1)) @@ -539,13 +576,13 @@ return spCog_And(lCog0, lCog1); } - else if (not lCog0) + else if (sIsFalse(lCog0)) { return false; } else if (sIsTrue(lCog0)) { - if (not iCog1) + if (sIsFalse(iCog1)) return false; if (sIsTrue(iCog1)) @@ -555,7 +592,7 @@ } else { - if (not iCog1) + if (sIsFalse(iCog1)) return false; if (sIsTrue(iCog1)) @@ -584,18 +621,6 @@ const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { return ioCog0 = sCog_And<Param>(ioCog0, iCallable1); } -template <class Param> -struct ZCogAccumulatorCombiner_And - { - void operator()(ZCog<Param>& io0, const ZCog<Param>& i1) const - { - if (io0) - io0 = sCog_And(io0, i1); - else - io0 = i1; - } - }; - // ================================================================================================= #pragma mark - #pragma mark * Binary parallel, sCog_Or @@ -610,6 +635,7 @@ const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { ZAssert(sIsPending(iCallable0) && sIsPending(iCallable1)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_Or<Param>)); return sBindR(spCallable, iCallable0, iCallable1); } @@ -646,7 +672,7 @@ if (sCallPendingCog_Unchanged(lCog1, iParam)) return iSelf; - if (not lCog1) + if (sIsFalse(lCog1)) return lCog0; if (sIsTrue(lCog1)) @@ -654,7 +680,7 @@ return spCog_Or(lCog0, lCog1); } - else if (not lCog0) + else if (sIsFalse(lCog0)) { if (sIsTrue(iCog1)) return true; @@ -693,26 +719,9 @@ const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { return ioCog0 = sCog_Or<Param>(ioCog0, iCallable1); } -template <class Param> -struct ZCogAccumulatorCombiner_Or - { - void operator()(ZCog<Param>& io0, const ZCog<Param>& i1) const - { - if (io0) - { - if (i1) - io0 = sCog_Or(io0, i1); - } - else - { - io0 = i1; - } - } - }; - // ================================================================================================= #pragma mark - -#pragma mark * sCog_With +#pragma mark * Binary parallel, sCog_With // Call cog1 so long as cog0 is pending. @@ -787,7 +796,7 @@ // ================================================================================================= #pragma mark - -#pragma mark * sCog_WithUnchanged +#pragma mark * Binary parallel, sCog_WithUnchanged // Call cog1 so long as cog0 is pending and unchanged. @@ -800,7 +809,8 @@ (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - ZAssert(iCallable0 && iCallable1); + ZAssert(sIsPending(iCallable0) && sIsPending(iCallable1)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_WithUnchanged<Param>)); return sBindR(spCallable, iCallable0, iCallable1); } @@ -848,45 +858,6 @@ const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { return ioCog0 = sCog_WithUnchanged<Param>(ioCog0, iCallable1); } -// ================================================================================================= -#pragma mark - -#pragma mark * Binary, sCog_Each - -// Call cog0 till it finishes, then call cog1 - -template <class Param> -ZCog<Param> sCog_Each - (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { - if (sIsPending(iCallable0)) - { - if (sIsPending(iCallable1)) - return +iCallable0 >> iCallable1; - return iCallable0; - } - return iCallable1; - } - -template <class Param> -ZCog<Param> operator^ - (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return sCog_Each<Param>(iCallable0, iCallable1); } - -template <class Param> -ZCog<Param>& operator^= - (ZCog<Param>& ioCog0, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return ioCog0 = ioCog0 ^ iCallable1; } - -template <class Param> -struct ZCogAccumulatorCombiner_Each - { - void operator()(ZCog<Param>& io0, const ZCog<Param>& i1) const - { io0 ^= i1; } - }; - } // namespace ZooLib #endif // __ZCog_h__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-09 20:06:59
|
Revision: 2664 http://zoolib.svn.sourceforge.net/zoolib/?rev=2664&view=rev Author: agreen Date: 2012-01-09 20:06:48 +0000 (Mon, 09 Jan 2012) Log Message: ----------- Change in notation to match what we're doing with cogs. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZTween.h Modified: trunk/zoolib/source/cxx/zoolib/ZTween.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZTween.h 2012-01-09 20:05:59 UTC (rev 2663) +++ trunk/zoolib/source/cxx/zoolib/ZTween.h 2012-01-09 20:06:48 UTC (rev 2664) @@ -123,14 +123,14 @@ // ================================================================================================= #pragma mark - -#pragma mark * sTween_Either +#pragma mark * sTween_Or template <class Val0, class Val1, class Combiner = TweenCombiner<Val0,Val1> > -class ZTween_Either +class ZTween_Or : public ZTween<Val0> { public: - ZTween_Either(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) + ZTween_Or(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) : f0(i0) , f1(i1) {} @@ -153,67 +153,67 @@ }; template <class Val0, class Val1> -ZRef<ZTween<Val0> > sTween_Either(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) +ZRef<ZTween<Val0> > sTween_Or(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) { if (i0) { if (i1) - return new ZTween_Either<Val0,Val1>(i0, i1); + return new ZTween_Or<Val0,Val1>(i0, i1); return i0; } return null; } template <class Val0, class Val1> -ZRef<ZTween<Val0> > operator+(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) - { return sTween_Either(i0, i1); } +ZRef<ZTween<Val0> > operator|(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) + { return sTween_Or(i0, i1); } template <class Val0, class Val1> -ZRef<ZTween<Val0> >& operator+=(ZRef<ZTween<Val0> >& io0, const ZRef<ZTween<Val1> >& i1) - { return io0 = io0 + i1; } +ZRef<ZTween<Val0> >& operator|=(ZRef<ZTween<Val0> >& io0, const ZRef<ZTween<Val1> >& i1) + { return io0 = io0 | i1; } // ================================================================================================= #pragma mark - -#pragma mark * sTween_Either (for homogenous pairs) +#pragma mark * sTween_Or (for homogenous pairs) template <class Val> -ZRef<ZTween<Val> > sTween_Either(const ZRef<ZTween<Val> >& i0, const ZRef<ZTween<Val> >& i1) +ZRef<ZTween<Val> > sTween_Or(const ZRef<ZTween<Val> >& i0, const ZRef<ZTween<Val> >& i1) { if (i0) { if (i1) - return new ZTween_Either<Val,Val>(i0, i1); + return new ZTween_Or<Val,Val>(i0, i1); return i0; } return i1; } template <class Val> -ZRef<ZTween<Val> > operator+(const ZRef<ZTween<Val> >& i0, const ZRef<ZTween<Val> >& i1) - { return sTween_Either(i0, i1); } +ZRef<ZTween<Val> > operator|(const ZRef<ZTween<Val> >& i0, const ZRef<ZTween<Val> >& i1) + { return sTween_Or(i0, i1); } template <class Val> -ZRef<ZTween<Val> >& operator+=(ZRef<ZTween<Val> >& io0, const ZRef<ZTween<Val> >& i1) - { return io0 = io0 + i1; } +ZRef<ZTween<Val> >& operator|=(ZRef<ZTween<Val> >& io0, const ZRef<ZTween<Val> >& i1) + { return io0 = io0 | i1; } template <class Val_p> -struct ZTweenAccumulatorCombiner_Either +struct ZTweenAccumulatorCombiner_Or { typedef Val_p Val; void operator()(ZRef<ZTween<Val> >& io0, const ZRef<ZTween<Val> >& i1) const - { io0 = sTween_Either<Val>(io0, i1); } + { io0 = sTween_Or<Val>(io0, i1); } }; // ================================================================================================= #pragma mark - -#pragma mark * sTween_Both +#pragma mark * sTween_And template <class Val0, class Val1, class Combiner = TweenCombiner<Val0,Val1> > -class ZTween_Both +class ZTween_And : public ZTween<Val0> { public: - ZTween_Both(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) + ZTween_And(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) : f0(i0) , f1(i1) {} @@ -236,29 +236,29 @@ }; template <class Val0, class Val1> -ZRef<ZTween<Val0> > sTween_Both(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) +ZRef<ZTween<Val0> > sTween_And(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) { if (i0 && i1) - return new ZTween_Both<Val0,Val1>(i0, i1); + return new ZTween_And<Val0,Val1>(i0, i1); return null; } template <class Val0, class Val1> -ZRef<ZTween<Val0> > operator*(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) - { return sTween_Both(i0, i1); } +ZRef<ZTween<Val0> > operator&(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) + { return sTween_And(i0, i1); } template <class Val0, class Val1> -ZRef<ZTween<Val0> >& operator*=(ZRef<ZTween<Val0> >& io0, const ZRef<ZTween<Val1> >& i1) - { return io0 = io0 * i1; } +ZRef<ZTween<Val0> >& operator&=(ZRef<ZTween<Val0> >& io0, const ZRef<ZTween<Val1> >& i1) + { return io0 = io0 & i1; } template <class Val_p> -struct ZTweenAccumulatorCombiner_Both +struct ZTweenAccumulatorCombiner_And { typedef Val_p Val; void operator()(ZRef<ZTween<Val> >& io0, const ZRef<ZTween<Val> >& i1) const { if (io0) - io0 = sTween_Both(io0, i1); + io0 = sTween_And(io0, i1); else io0 = i1; } @@ -308,12 +308,12 @@ } template <class Val> -ZRef<ZTween<Val> > operator|(const ZRef<ZTween<Val> >& i0, const ZRef<ZTween<Val> >& i1) +ZRef<ZTween<Val> > operator^(const ZRef<ZTween<Val> >& i0, const ZRef<ZTween<Val> >& i1) { return sTween_Each(i0, i1); } template <class Val> -ZRef<ZTween<Val> >& operator|=(ZRef<ZTween<Val> >& io0, const ZRef<ZTween<Val> >& i1) - { return io0 = io0 | i1; } +ZRef<ZTween<Val> >& operator^=(ZRef<ZTween<Val> >& io0, const ZRef<ZTween<Val> >& i1) + { return io0 = io0 ^ i1; } template <class Val_p> struct ZTweenAccumulatorCombiner_Each @@ -370,12 +370,12 @@ } template <class Val0, class Val1> -ZRef<ZTween<Val0> > operator^(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) +ZRef<ZTween<Val0> > operator/(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) { return sTween_With(i0, i1); } template <class Val0, class Val1> -ZRef<ZTween<Val0> >& operator^=(ZRef<ZTween<Val0> >& io0, const ZRef<ZTween<Val1> >& i1) - { return io0 = io0 ^ i1; } +ZRef<ZTween<Val0> >& operator/=(ZRef<ZTween<Val0> >& io0, const ZRef<ZTween<Val1> >& i1) + { return io0 = io0 / i1; } template <class Val_p> struct ZTweenAccumulatorCombiner_With @@ -741,7 +741,7 @@ template <class Val> ZRef<ZTween<Val> > sTween_Scale(Val iScale, const ZRef<ZTween<Val> >& iTween) - { return iTween ^ sTween_Const<Val>(iScale); } + { return iTween / sTween_Const<Val>(iScale); } // ================================================================================================= #pragma mark - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-09 20:06:05
|
Revision: 2663 http://zoolib.svn.sourceforge.net/zoolib/?rev=2663&view=rev Author: agreen Date: 2012-01-09 20:05:59 +0000 (Mon, 09 Jan 2012) Log Message: ----------- Conform to changes elsewhere. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog_Std.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog_Std.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog_Std.h 2012-01-09 20:05:33 UTC (rev 2662) +++ trunk/zoolib/source/cxx/zoolib/ZCog_Std.h 2012-01-09 20:05:59 UTC (rev 2663) @@ -35,7 +35,7 @@ ZTime iSystemTime) { if (ZTime::sSystem() > iSystemTime) - return sCog_Term<Param>(); + return true; return iSelf; } @@ -69,22 +69,22 @@ template <class Param> ZCog<Param> sCog_StartAt(ZTime iSystemTime, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) - { return sCog_DelayUntil<Param>(iSystemTime) | iCallable; } + { return sCog_DelayUntil<Param>(iSystemTime) >> iCallable; } template <class Param> ZCog<Param> sCog_StopAt(ZTime iSystemTime, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) - { return sCog_DelayUntil<Param>(iSystemTime) * iCallable; } + { return sCog_DelayUntil<Param>(iSystemTime) | iCallable; } template <class Param> ZCog<Param> sCog_StartAfter(double iDelay, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >iCallable) - { return sCog_DelayFor<Param>(iDelay) | iCallable; } + { return sCog_DelayFor<Param>(iDelay) >> iCallable; } template <class Param> ZCog<Param> sCog_StopAfter(double iDelay, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >iCallable) - { return sCog_DelayFor<Param>(iDelay) * iCallable; } + { return sCog_DelayFor<Param>(iDelay) | iCallable; } } // namespace ZooLib This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2012-01-09 20:05:44
|
Revision: 2662 http://zoolib.svn.sourceforge.net/zoolib/?rev=2662&view=rev Author: agreen Date: 2012-01-09 20:05:33 +0000 (Mon, 09 Jan 2012) Log Message: ----------- A fairly big rework, to conform more closely to the conventions of ternary logic. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-06 04:11:50 UTC (rev 2661) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-09 20:05:33 UTC (rev 2662) @@ -93,14 +93,29 @@ inherited::operator=(iNull); return *this; } + +//-- + + ZCog(const bool iBool) + : inherited(iBool ? sTrue() : null) + {} + + ZCog& operator=(const bool iBool) + { + inherited::operator=(iBool ? sTrue() : null); + return *this; + } + +//-- + + static ZCog sFalse() + { return null; } + + static const ZCog& sTrue(); }; -// ================================================================================================= -#pragma mark - -#pragma mark * sCog_Term - template <class Param> -ZCog<Param> spCogFun_Term(const ZCog<Param>& iSelf, Param iParam) +ZCog<Param> spCogFun_True(const ZCog<Param>& iSelf, Param iParam) { // Shouldn't ever call this. ZUnimplemented(); @@ -108,40 +123,66 @@ } template <class Param> -const ZCog<Param>& sCog_Term() +const ZCog<Param>& ZCog<Param>::sTrue() { - static const ZCog<Param> spCog = sCallable(spCogFun_Term<Param>); + static const ZCog<Param> spCog = sCallable(spCogFun_True<Param>); return spCog; } +// ================================================================================================= +#pragma mark - +#pragma mark * Nullary, sCog_Unknown + template <class Param> -const ZCog<Param>& sCog_Term - (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) - { return sCog_Term<Param>(); } +ZCog<Param> spCogFun_Unknown(const ZCog<Param>& iSelf, Param iParam) + { return iSelf; } template <class Param> -bool sIsTerm(const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) - { return sCog_Term<Param>() == iCallable; } +const ZCog<Param>& sCog_Unknown() + { + static const ZCog<Param> spCog = sCallable(spCogFun_Unknown<Param>); + return spCog; + } // ================================================================================================= #pragma mark - +#pragma mark * Cog classification + +template <class Param> +bool sIsTrue(const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { return ZCog<Param>::sTrue() == iCallable; } + +template <class Param> +bool sIsFalse(const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { return not iCallable; } + +template <class Param> +bool sIsFinished(const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { return not iCallable || sIsTrue(iCallable); } + +template <class Param> +bool sIsPending(const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { return iCallable && not sIsTrue(iCallable); } + +// ================================================================================================= +#pragma mark - #pragma mark * sCallCog variants template <class Cog> Cog sCallCog(const Cog& iCog, const typename Cog::Param iParam) { - if (not iCog || sIsTerm(iCog)) + if (sIsFinished(iCog)) return iCog; - return sCall(iCog, iCog, iParam); + return iCog->Call(iCog, iParam); } template <class Param> ZCog<Param> sCallCog (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable, Param iParam) { - if (not iCallable || sIsTerm(iCallable)) + if (sIsFinished(iCallable)) return iCallable; - return sCall(iCallable, iCallable, iParam); + return iCallable->Call(iCallable, iParam); } template <class Param> @@ -149,551 +190,586 @@ (const ZRef<ZCallable<ZCog<const Param&>(const ZCog<const Param&>&,const Param&)> >& iCallable, const Param& iParam) { - if (not iCallable || sIsTerm(iCallable)) + if (sIsFinished(iCallable)) return iCallable; - return sCall(iCallable, iCallable, iParam); + return iCallable->Call(iCallable, iParam); } template <class Cog> -bool sCallValidCogChanged(Cog& ioCog, const typename Cog::Param iParam) +bool sCallPendingCog_Changed(Cog& ioCog, const typename Cog::Param iParam) { return sCompareAndSet(ioCog, ioCog->Call(ioCog, iParam)); } template <class Cog> -bool sCallCogChanged(Cog& ioCog, const typename Cog::Param iParam) - { return ioCog && not sIsTerm(ioCog) && sCompareAndSet(ioCog, ioCog->Call(ioCog, iParam)); } +bool sCallCog_Changed(Cog& ioCog, const typename Cog::Param iParam) + { return sIsPending(ioCog) && sCompareAndSet(ioCog, ioCog->Call(ioCog, iParam)); } template <class Cog> -bool sCallValidCogUnchanged(Cog& ioCog, const typename Cog::Param iParam) +bool sCallPendingCog_Unchanged(Cog& ioCog, const typename Cog::Param iParam) { return not sCompareAndSet(ioCog, ioCog->Call(ioCog, iParam)); } template <class Cog> -bool sCallCogUnchanged(Cog& ioCog, const typename Cog::Param iParam) - { return not ioCog || sIsTerm(ioCog) || not sCompareAndSet(ioCog, ioCog->Call(ioCog, iParam)); } +bool sCallCog_Unchanged(Cog& ioCog, const typename Cog::Param iParam) + { return sIsFinished(ioCog) || not sCompareAndSet(ioCog, ioCog->Call(ioCog, iParam)); } // ================================================================================================= #pragma mark - -#pragma mark * sCog_Not +#pragma mark * Unary, sCog_Not template <class Param> +ZCog<Param> spCog_Not + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable); + +template <class Param> ZCog<Param> spCogFun_Not(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog) + ZCog<Param> lCog) { - if (not iCog || sIsTerm(iCog)) + if (sCallPendingCog_Unchanged(lCog, iParam)) return iSelf; - const ZCog<Param> newCog = iCog->Call(iCog, iParam); - if (not newCog || sIsTerm(newCog)) - return iSelf; + if (not lCog) + return true; - return null; + if (sIsTrue(lCog)) + return false; + + return spCog_Not(lCog); } template <class Param> -ZCog<Param> sCog_Not +ZCog<Param> spCog_Not (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { + ZAssert(iCallable && not sIsTrue(iCallable)); static ZMACRO_auto(spCallable, sCallable(spCogFun_Not<Param>)); - return sBindR(spCallable, iCallable); + return sBindR(spCallable, iCallable); } template <class Param> +ZCog<Param> sCog_Not + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { + if (not iCallable) + return true; + + if (sIsTrue(iCallable)) + return false; + + return spCog_Not(iCallable); + } + +template <class Param> ZCog<Param> operator~ (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { return sCog_Not<Param>(iCallable); } // ================================================================================================= #pragma mark - -#pragma mark * sCog_Either +#pragma mark * Unary, sCog_Tautology (TrueIfFinished) template <class Param> -ZCog<Param> spCogFun_Either(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1); +ZCog<Param> spCog_Tautology + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable); template <class Param> -ZCog<Param> spCog_Either - (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) +ZCog<Param> spCogFun_Tautology(const ZCog<Param>& iSelf, Param iParam, + ZCog<Param> lCog) { - ZAssert(iCallable0 && iCallable1); - static ZMACRO_auto(spCallable, sCallable(spCogFun_Either<Param>)); - return sBindR(spCallable, iCallable0, iCallable1); + if (sCallPendingCog_Unchanged(lCog, iParam)) + return iSelf; + + if (not lCog || sIsTrue(lCog)) + return true; + + return spCog_Tautology(lCog); } template <class Param> -ZCog<Param> sCog_Either - (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) +ZCog<Param> spCog_Tautology + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { - if (iCallable0) - { - if (iCallable1) - return spCog_Either(iCallable0, iCallable1); - return iCallable0; - } - return iCallable1; + ZAssert(iCallable && not sIsTrue(iCallable)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_Tautology<Param>)); + return sBindR(spCallable, iCallable); } template <class Param> -ZCog<Param> spCogFun_Either(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1) +ZCog<Param> sCog_Tautology + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) { - ZAssert(iCog0 && iCog1); - - if (sIsTerm(iCog0)) - { - if (sIsTerm(iCog1)) - return iCog0; - if (const ZCog<Param> newCog1 = iCog1->Call(iCog1, iParam)) - return newCog1; - return iCog0; - } - else - { - ZCog<Param> newCog0 = iCog0; - if (sCallValidCogUnchanged(newCog0, iParam)) - { - if (sIsTerm(iCog1)) - return newCog0; - - ZCog<Param> newCog1 = iCog1; - if (sCallValidCogUnchanged(newCog1, iParam)) - return iSelf; - if (not newCog1 || sIsTerm(newCog1)) - return newCog0; - return spCog_Either(newCog0, newCog1); - } - else if (not newCog0) - { - if (sIsTerm(iCog1)) - return iCog1; + if (not iCallable || sIsTrue(iCallable)) + return true; - return iCog1->Call(iCog1, iParam); - } - else if (sIsTerm(iCog1)) - { - return spCog_Either(newCog0, iCog1); - } - else if (const ZCog<Param> newCog1 = iCog1->Call(iCog1, iParam)) - { - return spCog_Either(newCog0, newCog1); - } - else - { - return newCog0; - } - } + return spCog_Tautology(iCallable); } template <class Param> -ZCog<Param> operator+ - (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return sCog_Either<Param>(iCallable0, iCallable1); } +ZCog<Param> operator+(const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { return sCog_Tautology<Param>(iCallable); } +// ================================================================================================= +#pragma mark - +#pragma mark * Unary, sCog_Contradiction (FalseIfFinished) + template <class Param> -ZCog<Param>& operator+= - (ZCog<Param>& ioCog0, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return ioCog0 = sCog_Either<Param>(ioCog0, iCallable1); } +ZCog<Param> spCog_Contradiction + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable); template <class Param> -struct ZCogAccumulatorCombiner_Either +ZCog<Param> spCogFun_Contradiction(const ZCog<Param>& iSelf, Param iParam, + ZCog<Param> lCog) { - void operator()(ZCog<Param>& io0, const ZCog<Param>& i1) const - { io0 = sCog_Either(io0, i1); } - }; + if (sCallPendingCog_Unchanged(lCog, iParam)) + return iSelf; + if (not lCog || sIsTrue(lCog)) + return false; + + return spCog_Contradiction(lCog); + } + +template <class Param> +ZCog<Param> spCog_Contradiction + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { + ZAssert(iCallable && not sIsTrue(iCallable)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_Contradiction<Param>)); + return sBindR(spCallable, iCallable); + } + +template <class Param> +ZCog<Param> sCog_Contradiction + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { + if (not iCallable || sIsTrue(iCallable)) + return false; + + return spCog_Contradiction(iCallable); + } + +template <class Param> +ZCog<Param> operator-(const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { return sCog_Contradiction<Param>(iCallable); } + // ================================================================================================= #pragma mark - -#pragma mark * sCog_Both +#pragma mark * Unary, sCog_Repeat template <class Param> -ZCog<Param> spCogFun_Both(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1); +ZCog<Param> spCog_Repeat + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable_Init, + const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable); template <class Param> -ZCog<Param> spCog_Both +ZCog<Param> spCogFun_Repeat(const ZCog<Param>& iSelf, Param iParam, + const ZCog<Param>& iCog_Init, const ZCog<Param>& iCog) + { + ZCog<Param> lCog = iCog; + + if (sCallPendingCog_Unchanged(lCog, iParam)) + return iSelf; + + if (not lCog) + return false; + + if (not sIsTrue(lCog)) + return spCog_Repeat(iCog_Init, lCog); + + // To get unbroken repetition on hitting a term we need to call the new cog, + // don't make the call if we'd just be calling an iSelf-equivalent. + if (iCog_Init == iCog) + return iSelf; + else + return sCallCog(spCog_Repeat(iCog_Init, iCog_Init), iParam); + } + +template <class Param> +ZCog<Param> spCog_Repeat + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable_Init, + const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { + ZAssert(iCallable_Init && iCallable); + static ZMACRO_auto(spCallable, sCallable(spCogFun_Repeat<Param>)); + return sBindR(spCallable, iCallable_Init, iCallable); + } + +template <class Param> +ZCog<Param> sCog_Repeat + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { + if (not iCallable) + return false; + + if (sIsTrue(iCallable)) + return sCog_Unknown<Param>(); + + return spCog_Repeat(iCallable, iCallable); + } + +template <class Param> +ZCog<Param> operator*(const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) + { return sCog_Repeat<Param>(iCallable); } + +// ================================================================================================= +#pragma mark - +#pragma mark * Binary sequential, sCog_Then + +// Call cog0 till it finishes, if true then call cog1 + +template <class Param> +ZCog<Param> spCog_Then (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) + const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1); + +template <class Param> +ZCog<Param> spCogFun_Then(const ZCog<Param>& iSelf, Param iParam, + ZCog<Param> lCog, const ZCog<Param>& iCog1) { - ZAssert(iCallable0 && iCallable1); - static ZMACRO_auto(spCallable, sCallable(spCogFun_Both<Param>)); - return sBindR(spCallable, iCallable0, iCallable1); + if (sCallPendingCog_Unchanged(lCog, iParam)) + return iSelf; + + if (sIsFalse(lCog)) + return false; + + if (sIsTrue(lCog)) + { + if (iCog1 && not sIsTrue(iCog1)) + return iCog1->Call(iCog1, iParam); + return iCog1; + } + + return spCog_Then(lCog, iCog1); } template <class Param> -ZCog<Param> sCog_Both +ZCog<Param> sCog_Then (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - if (iCallable0 && iCallable1) - return spCog_Both(iCallable0, iCallable1); - return null; + if (sIsFalse(iCallable0)) + return false; + + if (sIsTrue(iCallable0)) + return iCallable1; + + return spCog_Then(iCallable0, iCallable1); } template <class Param> -ZCog<Param> spCogFun_Both(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1) +ZCog<Param> spCog_Then + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, + const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - ZAssert(iCog0 && iCog1); - ZCog<Param> lCog0 = iCog0; - ZCog<Param> lCog1 = iCog1; + if (sIsFalse(iCallable0)) + return false; - if (sIsTerm(lCog0)) - { - if (not sIsTerm(lCog1) && not lCog1->Call(lCog1, iParam)) - return null; - return lCog0; - } - else if (sCallValidCogUnchanged(lCog0, iParam)) - { - if (sIsTerm(lCog1)) - return lCog1; - if (sCallValidCogUnchanged(lCog1, iParam)) - return iSelf; - if (not lCog1) - return null; - if (sIsTerm(lCog1)) - return lCog1; - return spCog_Both(lCog0, lCog1); - } - else if (not lCog0) - { - return null; - } - else if (sIsTerm(lCog0)) - { - if (sIsTerm(lCog1)) - return lCog1; - if ((lCog1 = lCog1->Call(lCog1, iParam)) && sIsTerm(lCog1)) - return lCog1; - return null; - } - else if (sIsTerm(lCog1)) - { - return lCog1; - } - else if ((lCog1 = lCog1->Call(lCog1, iParam))) - { - if (sIsTerm(lCog1)) - return lCog1; - return spCog_Both(lCog0, lCog1); - } - else - { - return null; - } + if (sIsTrue(iCallable0)) + return iCallable1; + + static ZMACRO_auto(spCallable, sCallable(spCogFun_Then<Param>)); + return sBindR(spCallable, iCallable0, iCallable1); } template <class Param> -ZCog<Param> operator* +ZCog<Param> operator>> (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return sCog_Both<Param>(iCallable0, iCallable1); } + { return sCog_Then<Param>(iCallable0, iCallable1); } template <class Param> -ZCog<Param>& operator*= +ZCog<Param>& operator>>= (ZCog<Param>& ioCog0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return ioCog0 = sCog_Both<Param>(ioCog0, iCallable1); } + { return ioCog0 = sCog_Then<Param>(ioCog0, iCallable1); } -template <class Param> -struct ZCogAccumulatorCombiner_Both - { - void operator()(ZCog<Param>& io0, const ZCog<Param>& i1) const - { - if (io0) - io0 = sCog_Both(io0, i1); - else - io0 = i1; - } - }; - // ================================================================================================= #pragma mark - -#pragma mark * sCog_Each +#pragma mark * Binary parallel, sCog_And template <class Param> -ZCog<Param> spCogFun_Each(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1); +ZCog<Param> spCogFun_And(const ZCog<Param>& iSelf, Param iParam, + ZCog<Param> lCog0, const ZCog<Param>& iCog1); template <class Param> -ZCog<Param> spCog_Each +ZCog<Param> spCog_And (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - ZAssert(iCallable0 && iCallable1); - static ZMACRO_auto(spCallable, sCallable(spCogFun_Each<Param>)); + ZAssert(sIsPending(iCallable0) && not sIsTrue(iCallable1)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_And<Param>)); return sBindR(spCallable, iCallable0, iCallable1); } template <class Param> -ZCog<Param> sCog_Each +ZCog<Param> sCog_And (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - if (iCallable0) - { - if (iCallable1) - return spCog_Each(iCallable0, iCallable1); + if (sIsFalse(iCallable0)) + return false; + + if (sIsTrue(iCallable0)) + return iCallable1; + + if (sIsTrue(iCallable1)) return iCallable0; - } - return iCallable1; + + return spCog_And(iCallable0, iCallable1); } template <class Param> -ZCog<Param> spCogFun_Each(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1) +ZCog<Param> spCogFun_And(const ZCog<Param>& iSelf, Param iParam, + ZCog<Param> lCog0, const ZCog<Param>& iCog1) { - ZAssert(iCog0 && iCog1); + ZAssert(sIsPending(lCog0) && not sIsTrue(iCog1)); - if (sIsTerm(iCog0)) + if (sCallPendingCog_Unchanged(lCog0, iParam)) { - if (sIsTerm(iCog1)) - return iCog1; + if (not iCog1) + return false; + + ZCog<Param> lCog1 = iCog1; + if (sCallPendingCog_Unchanged(lCog1, iParam)) + return iSelf; + + if (not lCog1) + return false; + + if (sIsTrue(lCog1)) + return lCog0; + + return spCog_And(lCog0, lCog1); + } + else if (not lCog0) + { + return false; + } + else if (sIsTrue(lCog0)) + { + if (not iCog1) + return false; + + if (sIsTrue(iCog1)) + return true; + return iCog1->Call(iCog1, iParam); } else { - ZCog<Param> newCog0 = iCog0; - if (sCallValidCogUnchanged(newCog0, iParam)) + if (not iCog1) + return false; + + if (sIsTrue(iCog1)) + return lCog0; + + if (ZCog<Param> lCog1 = iCog1->Call(iCog1, iParam)) { - return iSelf; + if (sIsTrue(lCog1)) + return lCog0; + return spCog_And(lCog0, lCog1); } - else if (not newCog0) - { - if (sIsTerm(iCog1)) - return iCog1; - return iCog1->Call(iCog1, iParam); - } - else if (sIsTerm(newCog0)) - { - if (sIsTerm(iCog1)) - return iCog1; - if (const ZCog<Param> newCog1 = iCog1->Call(iCog1, iParam)) - return spCog_Each(newCog0, newCog1); - return newCog0; - } - else - { - return spCog_Each(newCog0, iCog1); - } + + return false; } } template <class Param> -ZCog<Param> operator| +ZCog<Param> operator& (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return sCog_Each<Param>(iCallable0, iCallable1); } + { return sCog_And<Param>(iCallable0, iCallable1); } template <class Param> -ZCog<Param>& operator|= +ZCog<Param>& operator&= (ZCog<Param>& ioCog0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return ioCog0 = sCog_Each<Param>(ioCog0, iCallable1); } + { return ioCog0 = sCog_And<Param>(ioCog0, iCallable1); } template <class Param> -struct ZCogAccumulatorCombiner_Each +struct ZCogAccumulatorCombiner_And { void operator()(ZCog<Param>& io0, const ZCog<Param>& i1) const - { io0 = sCog_Each(io0, i1); } + { + if (io0) + io0 = sCog_And(io0, i1); + else + io0 = i1; + } }; // ================================================================================================= #pragma mark - -#pragma mark * sCog_With +#pragma mark * Binary parallel, sCog_Or template <class Param> -ZCog<Param> spCogFun_With(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1_Init, const ZCog<Param>& iCog1); +ZCog<Param> spCogFun_Or(const ZCog<Param>& iSelf, Param iParam, + ZCog<Param> lCog0, const ZCog<Param>& iCog1); template <class Param> -ZCog<Param> spCog_With +ZCog<Param> spCog_Or (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1_Init, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - ZAssert(iCallable0 && iCallable1_Init && iCallable1); - static ZMACRO_auto(spCallable, sCallable(spCogFun_With<Param>)); - return sBindR(spCallable, iCallable0, iCallable1_Init, iCallable1); + ZAssert(sIsPending(iCallable0) && sIsPending(iCallable1)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_Or<Param>)); + return sBindR(spCallable, iCallable0, iCallable1); } template <class Param> -ZCog<Param> sCog_With +ZCog<Param> sCog_Or (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - if (iCallable0) - { - if (iCallable1 && not sIsTerm(iCallable1)) - return spCog_With(iCallable0, iCallable1, iCallable1); + if (sIsFalse(iCallable0)) + return iCallable1; + + if (sIsTrue(iCallable0)) + return true; + + if (sIsFalse(iCallable1)) return iCallable0; - } - return null; + + return spCog_Or(iCallable0, iCallable1); } template <class Param> -ZCog<Param> spCogFun_With(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1_Init, const ZCog<Param>& iCog1) +ZCog<Param> spCogFun_Or(const ZCog<Param>& iSelf, Param iParam, + ZCog<Param> lCog0, const ZCog<Param>& iCog1) { - ZAssert(iCog0 && iCog1); - ZAssert(not sIsTerm(iCog1)); + ZAssert(sIsPending(lCog0) && iCog1); - ZCog<Param> lCog0 = iCog0; - ZCog<Param> lCog1 = iCog1; + if (sCallPendingCog_Unchanged(lCog0, iParam)) + { + if (sIsTrue(iCog1)) + return true; - if (sIsTerm(lCog0)) - { - if (not lCog1->Call(lCog1, iParam)) - return null; - return lCog0; - } - else if (sCallValidCogUnchanged(lCog0, iParam)) - { - if (sCallValidCogUnchanged(lCog1, iParam)) + ZCog<Param> lCog1 = iCog1; + if (sCallPendingCog_Unchanged(lCog1, iParam)) return iSelf; if (not lCog1) return lCog0; + + if (sIsTrue(lCog1)) + return true; - if (sIsTerm(lCog1)) - return spCog_With(lCog0, iCog1_Init, iCog1_Init); - - return spCog_With(lCog0, iCog1_Init, lCog1); + return spCog_Or(lCog0, lCog1); } else if (not lCog0) { - return null; + if (sIsTrue(iCog1)) + return true; + + return iCog1->Call(iCog1, iParam); } - else if (sIsTerm(lCog0)) + else if (sIsTrue(lCog0)) { - lCog1->Call(lCog1, iParam); - return lCog0; + return true; } else { - lCog1 = lCog1->Call(lCog1, iParam); + if (sIsTrue(iCog1)) + return true; - if (not lCog1) - return lCog0; + if (ZCog<Param> lCog1 = iCog1->Call(iCog1, iParam)) + { + if (sIsTrue(lCog1)) + return true; + return spCog_Or(lCog0, lCog1); + } - if (sIsTerm(lCog1)) - return spCog_With(lCog0, iCog1_Init, iCog1_Init); - - return spCog_With(lCog0, iCog1_Init, lCog1); + return lCog0; } } template <class Param> -ZCog<Param> operator^ +ZCog<Param> operator| (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return sCog_With<Param>(iCallable0, iCallable1); } + { return sCog_Or<Param>(iCallable0, iCallable1); } template <class Param> -ZCog<Param>& operator^= +ZCog<Param>& operator|= (ZCog<Param>& ioCog0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return ioCog0 = sCog_With<Param>(ioCog0, iCallable1); } + { return ioCog0 = sCog_Or<Param>(ioCog0, iCallable1); } template <class Param> -struct ZCogAccumulatorCombiner_With +struct ZCogAccumulatorCombiner_Or { void operator()(ZCog<Param>& io0, const ZCog<Param>& i1) const - { io0 = sCog_With(io0, i1); } + { + if (io0) + { + if (i1) + io0 = sCog_Or(io0, i1); + } + else + { + io0 = i1; + } + } }; // ================================================================================================= #pragma mark - -#pragma mark * sCog_FollowedBy +#pragma mark * sCog_With +// Call cog1 so long as cog0 is pending. + template <class Param> -ZCog<Param> spCogFun_FollowedBy_First(const ZCog<Param>& iSelf, Param iParam, +ZCog<Param> spCogFun_With(const ZCog<Param>& iSelf, Param iParam, const ZCog<Param>& iCog0, const ZCog<Param>& iCog1); template <class Param> -ZCog<Param> spCog_FollowedBy_First +ZCog<Param> spCog_With (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - ZAssert(iCallable0 && iCallable1); - static ZMACRO_auto(spCallable, sCallable(spCogFun_FollowedBy_First<Param>)); + ZAssert(sIsPending(iCallable0) && sIsPending(iCallable1)); + + static ZMACRO_auto(spCallable, sCallable(spCogFun_With<Param>)); return sBindR(spCallable, iCallable0, iCallable1); } template <class Param> -ZCog<Param> sCog_FollowedBy_First +ZCog<Param> sCog_With (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - if (iCallable0) - { - if (iCallable1) - return spCog_FollowedBy_First(iCallable0, iCallable1); - return iCallable0; - } - return null; + if (sIsPending(iCallable0) && sIsPending(iCallable1)) + return spCog_With(iCallable0, iCallable1); + return iCallable0; } template <class Param> -ZCog<Param> spCogFun_FollowedBy_Subsequent(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1); - -template <class Param> -ZCog<Param> spCog_FollowedBy_Subsequent - (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { - ZAssert(iCallable0 && iCallable1); - static ZMACRO_auto(spCallable, sCallable(spCogFun_FollowedBy_Subsequent<Param>)); - return sBindR(spCallable, iCallable0, iCallable1); - } - -template <class Param> -ZCog<Param> spCogFun_FollowedBy_Subsequent(const ZCog<Param>& iSelf, Param iParam, +ZCog<Param> spCogFun_With(const ZCog<Param>& iSelf, Param iParam, const ZCog<Param>& iCog0, const ZCog<Param>& iCog1) { - ZAssert(iCog0 && iCog1); + ZAssert(sIsPending(iCog0) && sIsPending(iCog1)); ZCog<Param> newCog0 = iCog0; - if (sCallValidCogUnchanged(newCog0, iParam)) - return iSelf; + if (sCallPendingCog_Unchanged(newCog0, iParam)) + { + ZCog<Param> newCog1 = iCog1; + if (sCallPendingCog_Unchanged(newCog1, iParam)) + return iSelf; - if (newCog0 && not sIsTerm(newCog0)) - return spCog_FollowedBy_Subsequent(newCog0, iCog1); - - if (not sIsTerm(iCog1)) - return iCog1->Call(iCog1, iParam); + if (sIsFinished(newCog1)) + return newCog0; - return iCog1; - } - -template <class Param> -ZCog<Param> spCogFun_FollowedBy_First(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog0, const ZCog<Param>& iCog1) - { - ZAssert(iCog0 && iCog1); - - if (sIsTerm(iCog0)) - { - if (sIsTerm(iCog1)) - return iCog1; - return iCog1->Call(iCog1, iParam); + return spCog_With(newCog0, newCog1); } - else if (const ZCog<Param> newCog0 = iCog0->Call(iCog0, iParam)) + else if (sIsPending(newCog0)) { - if (sIsTerm(newCog0)) - { - if (sIsTerm(iCog1)) - return iCog1; - return iCog1->Call(iCog1, iParam); - } - return spCog_FollowedBy_Subsequent(newCog0, iCog1); + ZCog<Param> newCog1 = iCog1->Call(iCog1, iParam); + if (sIsPending(newCog1)) + return spCog_With(newCog0, newCog1); + + return newCog0; } else { - return null; + return newCog0; } } @@ -701,66 +777,59 @@ ZCog<Param> operator/ (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return sCog_FollowedBy_First<Param>(iCallable0, iCallable1); } + { return sCog_With<Param>(iCallable0, iCallable1); } template <class Param> ZCog<Param>& operator/= (ZCog<Param>& ioCog0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return ioCog0 = sCog_FollowedBy_First<Param>(ioCog0, iCallable1); } + { return ioCog0 = sCog_With<Param>(ioCog0, iCallable1); } // ================================================================================================= #pragma mark - -#pragma mark * sCog_WhileUnchanged +#pragma mark * sCog_WithUnchanged -// Call cog1 so long as cog0 is unchanged. +// Call cog1 so long as cog0 is pending and unchanged. template <class Param> -ZCog<Param> spCogFun_WhileUnchanged(const ZCog<Param>& iSelf, Param iParam, +ZCog<Param> spCogFun_WithUnchanged(const ZCog<Param>& iSelf, Param iParam, const ZCog<Param>& iCog0, const ZCog<Param>& iCog1); template <class Param> -ZCog<Param> spCog_WhileUnchanged +ZCog<Param> spCog_WithUnchanged (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { ZAssert(iCallable0 && iCallable1); - static ZMACRO_auto(spCallable, sCallable(spCogFun_WhileUnchanged<Param>)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_WithUnchanged<Param>)); return sBindR(spCallable, iCallable0, iCallable1); } template <class Param> -ZCog<Param> sCog_WhileUnchanged +ZCog<Param> sCog_WithUnchanged (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - if (iCallable0) - { - if (iCallable1) - return spCog_WhileUnchanged(iCallable0, iCallable1); - return iCallable0; - } - return null; + if (sIsPending(iCallable0) && sIsPending(iCallable1)) + return spCog_WithUnchanged(iCallable0, iCallable1); + return iCallable0; } template <class Param> -ZCog<Param> spCogFun_WhileUnchanged(const ZCog<Param>& iSelf, Param iParam, +ZCog<Param> spCogFun_WithUnchanged(const ZCog<Param>& iSelf, Param iParam, const ZCog<Param>& iCog0, const ZCog<Param>& iCog1) { - ZAssert(iCog0 && iCog1); + ZAssert(sIsPending(iCog0) && sIsPending(iCog1)); - if (sIsTerm(iCog0)) - return iCog0; - ZCog<Param> newCog0 = iCog0; - if (sCallValidCogChanged(newCog0, iParam)) + if (sCallPendingCog_Changed(newCog0, iParam)) return newCog0; ZCog<Param> newCog1 = iCog1; - if (sCallValidCogChanged(newCog1, iParam)) + if (sCallPendingCog_Changed(newCog1, iParam)) { - if (newCog1 && not sIsTerm(newCog1)) - return spCog_WhileUnchanged(newCog0, newCog1); + if (sIsPending(newCog1)) + return spCog_WithUnchanged(newCog0, newCog1); return newCog0; } @@ -771,121 +840,53 @@ ZCog<Param> operator% (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return sCog_WhileUnchanged<Param>(iCallable0, iCallable1); } + { return sCog_WithUnchanged<Param>(iCallable0, iCallable1); } template <class Param> ZCog<Param>& operator%= (ZCog<Param>& ioCog0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return ioCog0 = sCog_WhileUnchanged<Param>(ioCog0, iCallable1); } + { return ioCog0 = sCog_WithUnchanged<Param>(ioCog0, iCallable1); } // ================================================================================================= #pragma mark - -#pragma mark * sCog_Once +#pragma mark * Binary, sCog_Each -template <class Param> -ZCog<Param> sCog_Once(const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) - { return iCallable * sCog_Term<Param>(); } +// Call cog0 till it finishes, then call cog1 -// ================================================================================================= -#pragma mark - -#pragma mark * sCog_While - template <class Param> -ZCog<Param> spCog_While(const ZCog<Param>& iCog_Init, const ZCog<Param>& iCog); - -template <class Param> -ZCog<Param> spCogFun_While(const ZCog<Param>& iSelf, Param iParam, - const ZCog<Param>& iCog_Init, const ZCog<Param>& iCog) +ZCog<Param> sCog_Each + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, + const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { - ZAssert(iCog_Init && iCog); - - if (sIsTerm(iCog)) - return iSelf; - - ZCog<Param> newCog = iCog; - if (sCallValidCogUnchanged(newCog, iParam)) - return iSelf; - - if (not newCog) - return null; - - if (not sIsTerm(newCog)) - return spCog_While(iCog_Init, newCog); - - // To get unbroken repetition on hitting a term we need to call the new cog. - // Only do so if this was not the first time, otherwise we're likely to - // recurse indefinitely and blow the stack. - if (iCog_Init == iCog) - return spCog_While(iCog_Init, iCog_Init); - else - return sCallCog(spCog_While(iCog_Init, iCog_Init), iParam); - } - -template <class Param> -ZCog<Param> spCog_While(const ZCog<Param>& iCog_Init, const ZCog<Param>& iCog) - { - static ZMACRO_auto(spCallable, sCallable(spCogFun_While<Param>)); - return sBindR(spCallable, iCog_Init, iCog); - } - -template <class Param> -ZCog<Param> sCog_While(const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) - { - if (iCallable) + if (sIsPending(iCallable0)) { - if (sIsTerm(iCallable)) - return iCallable; - return spCog_While<Param>(iCallable, iCallable); + if (sIsPending(iCallable1)) + return +iCallable0 >> iCallable1; + return iCallable0; } - return null; + return iCallable1; } template <class Param> -ZCog<Param> operator*(const ZCog<Param>& iCog) - { return sCog_While<Param>(iCog); } +ZCog<Param> operator^ + (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, + const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) + { return sCog_Each<Param>(iCallable0, iCallable1); } -// ================================================================================================= -#pragma mark - -#pragma mark * sCog_Repeat (count) - template <class Param> -ZCog<Param> spCog_Repeat(size_t iCount, const ZCog<Param>& iCog_Init, const ZCog<Param>& iCog); +ZCog<Param>& operator^= + (ZCog<Param>& ioCog0, + const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) + { return ioCog0 = ioCog0 ^ iCallable1; } template <class Param> -ZCog<Param> spCogFun_Repeat(const ZCog<Param>& iSelf, Param iParam, - size_t iCount, const ZCog<Param>& iCog_Init, const ZCog<Param>& iCog) +struct ZCogAccumulatorCombiner_Each { - if (sCallCogUnchanged(iCog, iParam)) - return iSelf; + void operator()(ZCog<Param>& io0, const ZCog<Param>& i1) const + { io0 ^= i1; } + }; - if (not iCog) - return null; - - if (sIsTerm(iCog)) - return sCallCog(spCog_Repeat(iCount - 1, iCog_Init, iCog_Init), iParam); - else - return spCog_Repeat(iCount, iCog_Init, iCog); - } - -template <class Param> -ZCog<Param> spCog_Repeat(size_t iCount, const ZCog<Param>& iCog_Init, const ZCog<Param>& iCog) - { - static ZMACRO_auto(spCallable, sCallable(spCogFun_Repeat<Param>)); - if (iCount && iCog_Init) - { - if (sIsTerm(iCog_Init)) - return iCog_Init; - return sBindR(spCallable, iCount, iCog_Init, iCog); - } - return null; - } - -template <class Param> -ZCog<Param> sCog_Repeat(size_t iCount, - const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable) - { return spCog_Repeat<Param>(iCount, iCallable, iCallable); } - } // namespace ZooLib #endif // __ZCog_h__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |