├── .editorconfig ├── .gitattributes ├── .github └── workflows │ ├── Workflows.md │ ├── build_android.yml │ ├── build_ios.yml │ ├── build_linux.yml │ ├── build_macos.yml │ ├── build_tvos.yml │ ├── build_windows.yml │ ├── test_android.yml │ ├── test_ios.yml │ ├── test_linux.yml │ ├── test_macos.yml │ ├── test_tvos.yml │ └── test_windows.yml ├── .gitignore ├── CMakeLists.txt ├── Documentation ├── bugs.html ├── building.html ├── classes.html ├── code.html ├── contributing.html ├── features.html ├── functors.html ├── index.html ├── licence.html ├── performance.html ├── platform.html ├── resources.html ├── src │ ├── css │ │ └── refnum.css │ ├── img │ │ ├── background.jpg │ │ ├── button_thin_cell.png │ │ ├── button_thin_icons.png │ │ ├── page_body.png │ │ ├── page_footer.png │ │ ├── page_strap_nano.jpg │ │ └── page_strap_nano.png │ └── js │ │ └── refnum.js ├── standards.html ├── undo.html └── version.html ├── LICENSE.md ├── Library ├── Project │ ├── CMakeLists.txt │ └── Nano.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ └── xcschemes │ │ ├── Nano_iOS - Debug.xcscheme │ │ ├── Nano_iOS - Release.xcscheme │ │ ├── Nano_macOS - Debug.xcscheme │ │ ├── Nano_macOS - Release.xcscheme │ │ ├── Nano_tvOS - Debug.xcscheme │ │ └── Nano_tvOS - Release.xcscheme ├── Source │ ├── Nanites │ │ ├── Catch │ │ │ ├── NTestFixture.cpp │ │ │ ├── NTestFixture.h │ │ │ └── catch.hpp │ │ ├── CoreFoundation │ │ │ ├── NCFArray.cpp │ │ │ ├── NCFArray.h │ │ │ ├── NCFArray.inl │ │ │ ├── NCFData.cpp │ │ │ ├── NCFData.h │ │ │ ├── NCFData.inl │ │ │ ├── NCFDate.cpp │ │ │ ├── NCFDate.h │ │ │ ├── NCFDate.inl │ │ │ ├── NCFDictionary.cpp │ │ │ ├── NCFDictionary.h │ │ │ ├── NCFDictionary.inl │ │ │ ├── NCFNumber.cpp │ │ │ ├── NCFNumber.h │ │ │ ├── NCFNumber.inl │ │ │ ├── NCFObject.h │ │ │ ├── NCFObject.inl │ │ │ ├── NCFString.cpp │ │ │ ├── NCFString.h │ │ │ ├── NCFString.inl │ │ │ ├── NCFURL.cpp │ │ │ ├── NCFURL.h │ │ │ ├── NCFURL.inl │ │ │ ├── NCoreFoundation.cpp │ │ │ ├── NCoreFoundation.h │ │ │ └── NCoreFoundation.inl │ │ ├── CoreGraphics │ │ │ ├── NCGColor.h │ │ │ ├── NCGColor.inl │ │ │ ├── NCGContext.cpp │ │ │ ├── NCGContext.h │ │ │ ├── NCGContext.inl │ │ │ ├── NCGImage.cpp │ │ │ ├── NCGImage.h │ │ │ ├── NCGShading.cpp │ │ │ ├── NCGShading.h │ │ │ ├── NCGShading.inl │ │ │ ├── NCoreGraphics.h │ │ │ └── NCoreGraphics.inl │ │ ├── Qt │ │ │ ├── NQt.cpp │ │ │ └── NQt.h │ │ ├── Skia │ │ │ ├── NSkia.cpp │ │ │ └── NSkia.h │ │ ├── UIKit │ │ │ ├── NUIKit.h │ │ │ └── NUIKit.mm │ │ └── Windows │ │ │ ├── NRegistry.cpp │ │ │ ├── NRegistry.h │ │ │ ├── NWindows.h │ │ │ └── NWindows.inl │ └── Nano │ │ ├── Application │ │ ├── NCommandLine.cpp │ │ ├── NCommandLine.h │ │ ├── NPreference.h │ │ ├── NPreference.inl │ │ ├── NPreferenceFile.cpp │ │ ├── NPreferenceFile.h │ │ ├── NPreferences.cpp │ │ ├── NPreferences.h │ │ ├── NUndoManager.cpp │ │ ├── NUndoManager.h │ │ ├── NUndoSource.cpp │ │ └── NUndoSource.h │ │ ├── Core │ │ ├── NanoConstants.h │ │ ├── NanoMacros.h │ │ ├── NanoTargets.h │ │ └── NanoTypes.h │ │ ├── Data │ │ ├── NData.cpp │ │ ├── NData.h │ │ ├── NData.inl │ │ ├── NDataCipher.cpp │ │ ├── NDataCipher.h │ │ ├── NDataCompressor.cpp │ │ ├── NDataCompressor.h │ │ ├── NDataDigest.cpp │ │ ├── NDataDigest.h │ │ ├── NDataDigest.inl │ │ ├── NDataEncoder.cpp │ │ └── NDataEncoder.h │ │ ├── Debugging │ │ ├── NDebug.cpp │ │ ├── NDebug.h │ │ ├── NDebug.inl │ │ ├── NDebugger.cpp │ │ ├── NDebugger.h │ │ ├── NLog.cpp │ │ ├── NLog.h │ │ ├── NLogOutput.cpp │ │ ├── NLogOutput.h │ │ ├── NUsageBucket.cpp │ │ ├── NUsageBucket.h │ │ ├── NUsageLog.cpp │ │ └── NUsageLog.h │ │ ├── Events │ │ ├── NBroadcast.h │ │ ├── NBroadcast.inl │ │ ├── NBroadcastQueue.cpp │ │ ├── NBroadcastQueue.h │ │ ├── NBroadcaster.cpp │ │ ├── NBroadcaster.h │ │ ├── NProgressable.cpp │ │ ├── NProgressable.h │ │ ├── NReceiver.cpp │ │ └── NReceiver.h │ │ ├── Files │ │ ├── NBundle.cpp │ │ ├── NBundle.h │ │ ├── NBundle.inl │ │ ├── NDBHandle.cpp │ │ ├── NDBHandle.h │ │ ├── NDBQuery.cpp │ │ ├── NDBQuery.h │ │ ├── NDBResult.cpp │ │ ├── NDBResult.h │ │ ├── NFile.cpp │ │ ├── NFile.h │ │ ├── NFileHandle.cpp │ │ ├── NFileHandle.h │ │ ├── NFileInfo.cpp │ │ ├── NFileInfo.h │ │ ├── NFileMap.cpp │ │ ├── NFileMap.h │ │ ├── NFilePath.cpp │ │ ├── NFilePath.h │ │ ├── NFileScanner.cpp │ │ ├── NFileScanner.h │ │ ├── NFileScanner.inl │ │ ├── NFileUtils.cpp │ │ ├── NFileUtils.h │ │ ├── NPropertyList.cpp │ │ ├── NPropertyList.h │ │ ├── NUTI.cpp │ │ ├── NUTI.h │ │ ├── NUTIRegistry.cpp │ │ └── NUTIRegistry.h │ │ ├── Graphics │ │ ├── NColor.cpp │ │ ├── NColor.h │ │ ├── NColor.inl │ │ ├── NGeomUtils.cpp │ │ ├── NGeomUtils.h │ │ ├── NImage.cpp │ │ ├── NImage.h │ │ ├── NImage.inl │ │ ├── NPoint.h │ │ ├── NPoint.inl │ │ ├── NRectangle.h │ │ ├── NRectangle.inl │ │ ├── NShape.h │ │ ├── NShape.inl │ │ ├── NSize.h │ │ ├── NSize.inl │ │ ├── NTransform.h │ │ ├── NTransform.inl │ │ ├── NVector.h │ │ └── NVector.inl │ │ ├── Internal │ │ ├── Components │ │ │ ├── Read Me.txt │ │ │ ├── WjCryptLib-2.3.0 │ │ │ │ ├── UNLICENSE │ │ │ │ ├── WjCryptLib_Aes.c │ │ │ │ ├── WjCryptLib_Aes.h │ │ │ │ ├── WjCryptLib_Md5.c │ │ │ │ ├── WjCryptLib_Md5.h │ │ │ │ ├── WjCryptLib_Sha1.c │ │ │ │ ├── WjCryptLib_Sha1.h │ │ │ │ ├── WjCryptLib_Sha256.c │ │ │ │ └── WjCryptLib_Sha256.h │ │ │ ├── expat-2.4.1 │ │ │ │ ├── COPYING │ │ │ │ ├── Nano_expat_config.h │ │ │ │ ├── ascii.h │ │ │ │ ├── asciitab.h │ │ │ │ ├── expat.h │ │ │ │ ├── expat_external.h │ │ │ │ ├── iasciitab.h │ │ │ │ ├── internal.h │ │ │ │ ├── latin1tab.h │ │ │ │ ├── nametab.h │ │ │ │ ├── siphash.h │ │ │ │ ├── utf8tab.h │ │ │ │ ├── winconfig.h │ │ │ │ ├── xmlparse.c │ │ │ │ ├── xmlrole.c │ │ │ │ ├── xmlrole.h │ │ │ │ ├── xmltok.c │ │ │ │ ├── xmltok.h │ │ │ │ ├── xmltok_impl.c │ │ │ │ ├── xmltok_impl.h │ │ │ │ └── xmltok_ns.c │ │ │ ├── fast_float-1.1.2 │ │ │ │ ├── LICENSE-MIT │ │ │ │ ├── Nano_fast_float.h │ │ │ │ ├── ascii_number.h │ │ │ │ ├── decimal_to_binary.h │ │ │ │ ├── fast_float.h │ │ │ │ ├── fast_table.h │ │ │ │ ├── float_common.h │ │ │ │ ├── parse_number.h │ │ │ │ └── simple_decimal_conversion.h │ │ │ ├── fmt-8.0.0 │ │ │ │ ├── LICENSE.rst │ │ │ │ ├── Nano_fmt_format.h │ │ │ │ ├── fmt_core.h │ │ │ │ ├── fmt_format-inl.h │ │ │ │ ├── fmt_format.h │ │ │ │ ├── fmt_ostream.h │ │ │ │ └── fmt_printf.h │ │ │ ├── hopscotch-map-2.3.0 │ │ │ │ ├── LICENSE │ │ │ │ ├── hopscotch_growth_policy.h │ │ │ │ ├── hopscotch_hash.h │ │ │ │ ├── hopscotch_map.h │ │ │ │ └── hopscotch_set.h │ │ │ ├── json-parser-1.1.0 │ │ │ │ ├── LICENSE │ │ │ │ ├── json.c │ │ │ │ └── json.h │ │ │ ├── libb64-2.0.0 │ │ │ │ ├── LICENSE.md │ │ │ │ ├── Nano_libb64.h │ │ │ │ ├── ccommon.h │ │ │ │ ├── cdecode.c │ │ │ │ ├── cdecode.h │ │ │ │ ├── cencode.c │ │ │ │ └── cencode.h │ │ │ ├── pcre2-10.37 │ │ │ │ ├── LICENCE │ │ │ │ ├── Nano_pcre2.h │ │ │ │ ├── config.h │ │ │ │ ├── pcre2.h │ │ │ │ ├── pcre2_auto_possess.c │ │ │ │ ├── pcre2_chartables.c │ │ │ │ ├── pcre2_compile.c │ │ │ │ ├── pcre2_config.c │ │ │ │ ├── pcre2_context.c │ │ │ │ ├── pcre2_convert.c │ │ │ │ ├── pcre2_dfa_match.c │ │ │ │ ├── pcre2_error.c │ │ │ │ ├── pcre2_extuni.c │ │ │ │ ├── pcre2_find_bracket.c │ │ │ │ ├── pcre2_fuzzsupport.c │ │ │ │ ├── pcre2_internal.h │ │ │ │ ├── pcre2_intmodedep.h │ │ │ │ ├── pcre2_jit_compile.c │ │ │ │ ├── pcre2_jit_match.c │ │ │ │ ├── pcre2_jit_misc.c │ │ │ │ ├── pcre2_jit_neon_inc.h │ │ │ │ ├── pcre2_jit_simd_inc.h │ │ │ │ ├── pcre2_maketables.c │ │ │ │ ├── pcre2_match.c │ │ │ │ ├── pcre2_match_data.c │ │ │ │ ├── pcre2_newline.c │ │ │ │ ├── pcre2_ord2utf.c │ │ │ │ ├── pcre2_pattern_info.c │ │ │ │ ├── pcre2_printint.c │ │ │ │ ├── pcre2_script_run.c │ │ │ │ ├── pcre2_serialize.c │ │ │ │ ├── pcre2_string_utils.c │ │ │ │ ├── pcre2_study.c │ │ │ │ ├── pcre2_substitute.c │ │ │ │ ├── pcre2_substring.c │ │ │ │ ├── pcre2_tables.c │ │ │ │ ├── pcre2_ucd.c │ │ │ │ ├── pcre2_ucp.h │ │ │ │ ├── pcre2_valid_utf.c │ │ │ │ └── pcre2_xclass.c │ │ │ ├── sqlite-3.36.0 │ │ │ │ ├── LICENSE.md │ │ │ │ ├── Nano_sqlite3.h │ │ │ │ ├── sqlite3.36.0.c │ │ │ │ └── sqlite3.36.0.h │ │ │ ├── xxHash-0.8.0 │ │ │ │ ├── LICENSE │ │ │ │ ├── Nano_xxhash.h │ │ │ │ └── xxhash.h │ │ │ └── zlib-1.2.11 │ │ │ │ ├── Nano_zlib.h │ │ │ │ ├── README │ │ │ │ ├── adler32.c │ │ │ │ ├── compress.c │ │ │ │ ├── crc32.c │ │ │ │ ├── crc32.h │ │ │ │ ├── deflate.c │ │ │ │ ├── deflate.h │ │ │ │ ├── gzclose.c │ │ │ │ ├── gzguts.h │ │ │ │ ├── gzlib.c │ │ │ │ ├── gzread.c │ │ │ │ ├── gzwrite.c │ │ │ │ ├── infback.c │ │ │ │ ├── inffast.c │ │ │ │ ├── inffast.h │ │ │ │ ├── inffixed.h │ │ │ │ ├── inflate.c │ │ │ │ ├── inflate.h │ │ │ │ ├── inftrees.c │ │ │ │ ├── inftrees.h │ │ │ │ ├── trees.c │ │ │ │ ├── trees.h │ │ │ │ ├── uncompr.c │ │ │ │ ├── zconf.h │ │ │ │ ├── zlib.h │ │ │ │ ├── zutil.c │ │ │ │ └── zutil.h │ │ └── Targets │ │ │ ├── Android │ │ │ ├── AndroidNBundle.cpp │ │ │ ├── AndroidNDebugger.cpp │ │ │ ├── AndroidNFileHandle.cpp │ │ │ ├── AndroidNFileInfo.cpp │ │ │ ├── AndroidNFileMap.cpp │ │ │ ├── AndroidNFileUtils.cpp │ │ │ ├── AndroidNImage.cpp │ │ │ ├── AndroidNMachine.cpp │ │ │ ├── AndroidNProcess.cpp │ │ │ ├── AndroidNRandom.cpp │ │ │ ├── AndroidNRunLoop.cpp │ │ │ ├── AndroidNSemaphore.cpp │ │ │ ├── AndroidNSystem.cpp │ │ │ ├── AndroidNThread.cpp │ │ │ └── AndroidNTimeUtils.cpp │ │ │ ├── Common │ │ │ ├── NCommonDarwin.h │ │ │ ├── NCommonDarwin.mm │ │ │ ├── NCommonLinux.cpp │ │ │ ├── NCommonLinux.h │ │ │ ├── NCommonPOSIX.cpp │ │ │ ├── NCommonPOSIX.h │ │ │ ├── NCommonWindows.cpp │ │ │ └── NCommonWindows.h │ │ │ ├── Linux │ │ │ ├── LinuxNBundle.cpp │ │ │ ├── LinuxNDebugger.cpp │ │ │ ├── LinuxNFileHandle.cpp │ │ │ ├── LinuxNFileInfo.cpp │ │ │ ├── LinuxNFileMap.cpp │ │ │ ├── LinuxNFileUtils.cpp │ │ │ ├── LinuxNImage.cpp │ │ │ ├── LinuxNMachine.cpp │ │ │ ├── LinuxNProcess.cpp │ │ │ ├── LinuxNRandom.cpp │ │ │ ├── LinuxNRunLoop.cpp │ │ │ ├── LinuxNSemaphore.cpp │ │ │ ├── LinuxNSystem.cpp │ │ │ ├── LinuxNThread.cpp │ │ │ ├── LinuxNTimeUtils.cpp │ │ │ ├── NLinuxNetwork.cpp │ │ │ └── NLinuxSystem.cpp │ │ │ ├── NTargetNetwork.h │ │ │ ├── NTargetSystem.h │ │ │ ├── Windows │ │ │ ├── NWinNetwork.cpp │ │ │ ├── NWinSystem.cpp │ │ │ ├── StdAfx.cpp │ │ │ ├── StdAfx.h │ │ │ ├── WindowsNBundle.cpp │ │ │ ├── WindowsNDebugger.cpp │ │ │ ├── WindowsNFileHandle.cpp │ │ │ ├── WindowsNFileInfo.cpp │ │ │ ├── WindowsNFileMap.cpp │ │ │ ├── WindowsNFileUtils.cpp │ │ │ ├── WindowsNImage.cpp │ │ │ ├── WindowsNMachine.cpp │ │ │ ├── WindowsNProcess.cpp │ │ │ ├── WindowsNRandom.cpp │ │ │ ├── WindowsNRunLoop.cpp │ │ │ ├── WindowsNSemaphore.cpp │ │ │ ├── WindowsNSystem.cpp │ │ │ ├── WindowsNThread.cpp │ │ │ └── WindowsNTimeUtils.cpp │ │ │ ├── iOS │ │ │ ├── NIOSNetwork.cpp │ │ │ ├── NIOSSystem.cpp │ │ │ ├── iOSNBundle.cpp │ │ │ ├── iOSNDebugger.cpp │ │ │ ├── iOSNFileHandle.cpp │ │ │ ├── iOSNFileInfo.cpp │ │ │ ├── iOSNFileMap.cpp │ │ │ ├── iOSNFileUtils.cpp │ │ │ ├── iOSNImage.cpp │ │ │ ├── iOSNMachine.cpp │ │ │ ├── iOSNProcess.cpp │ │ │ ├── iOSNRandom.cpp │ │ │ ├── iOSNRunLoop.cpp │ │ │ ├── iOSNSemaphore.cpp │ │ │ ├── iOSNSystem.cpp │ │ │ ├── iOSNThread.cpp │ │ │ └── iOSNTimeUtils.cpp │ │ │ ├── macOS │ │ │ ├── NMacNetwork.cpp │ │ │ ├── NMacSystem.cpp │ │ │ ├── macOSNBundle.cpp │ │ │ ├── macOSNDebugger.cpp │ │ │ ├── macOSNFileHandle.cpp │ │ │ ├── macOSNFileInfo.cpp │ │ │ ├── macOSNFileMap.cpp │ │ │ ├── macOSNFileUtils.mm │ │ │ ├── macOSNImage.cpp │ │ │ ├── macOSNMachine.cpp │ │ │ ├── macOSNProcess.cpp │ │ │ ├── macOSNRandom.cpp │ │ │ ├── macOSNRunLoop.cpp │ │ │ ├── macOSNSemaphore.cpp │ │ │ ├── macOSNSystem.cpp │ │ │ ├── macOSNThread.cpp │ │ │ └── macOSNTimeUtils.cpp │ │ │ └── tvOS │ │ │ ├── tvOSNBundle.cpp │ │ │ ├── tvOSNDebugger.cpp │ │ │ ├── tvOSNFileHandle.cpp │ │ │ ├── tvOSNFileInfo.cpp │ │ │ ├── tvOSNFileMap.cpp │ │ │ ├── tvOSNFileUtils.cpp │ │ │ ├── tvOSNImage.cpp │ │ │ ├── tvOSNMachine.cpp │ │ │ ├── tvOSNProcess.cpp │ │ │ ├── tvOSNRandom.cpp │ │ │ ├── tvOSNRunLoop.cpp │ │ │ ├── tvOSNSemaphore.cpp │ │ │ ├── tvOSNSystem.cpp │ │ │ ├── tvOSNThread.cpp │ │ │ └── tvOSNTimeUtils.cpp │ │ ├── Maths │ │ ├── NMathUtils.cpp │ │ ├── NMathUtils.h │ │ ├── NMathUtils.inl │ │ ├── NRandom.cpp │ │ ├── NRandom.h │ │ ├── NRandom.inl │ │ ├── NRandomGenerator.h │ │ ├── NRandomGenerator.inl │ │ ├── NUInt128.h │ │ └── NUInt128.inl │ │ ├── Nano Prefix.h │ │ ├── Network │ │ ├── NMessageClient.cpp │ │ ├── NMessageClient.h │ │ ├── NMessageEntity.cpp │ │ ├── NMessageEntity.h │ │ ├── NMessageServer.cpp │ │ ├── NMessageServer.h │ │ ├── NNetworkBrowser.cpp │ │ ├── NNetworkBrowser.h │ │ ├── NNetworkManager.cpp │ │ ├── NNetworkManager.h │ │ ├── NNetworkMessage.cpp │ │ ├── NNetworkMessage.h │ │ ├── NNetworkService.cpp │ │ ├── NNetworkService.h │ │ ├── NSocket.cpp │ │ ├── NSocket.h │ │ ├── NSocketRequest.cpp │ │ ├── NSocketRequest.h │ │ ├── NURLRequest.cpp │ │ ├── NURLRequest.h │ │ ├── NURLResponse.cpp │ │ └── NURLResponse.h │ │ ├── Std │ │ ├── NStdAlgorithm.h │ │ ├── NStdContainer.h │ │ ├── NStdMath.h │ │ ├── NStdMemory.h │ │ └── NStdUtility.h │ │ ├── System │ │ ├── NByteSwap.cpp │ │ ├── NByteSwap.h │ │ ├── NByteSwap.inl │ │ ├── NJSONEncoder.cpp │ │ ├── NJSONEncoder.h │ │ ├── NLocale.cpp │ │ ├── NLocale.h │ │ ├── NMachine.cpp │ │ ├── NMachine.h │ │ ├── NPOSIX.cpp │ │ ├── NPOSIX.h │ │ ├── NProcess.cpp │ │ ├── NProcess.h │ │ ├── NSystem.cpp │ │ ├── NSystem.h │ │ ├── NTask.cpp │ │ ├── NTask.h │ │ ├── NVersion.cpp │ │ ├── NVersion.h │ │ ├── NVersion.inl │ │ ├── NXMLEncoder.cpp │ │ ├── NXMLEncoder.h │ │ ├── NXMLNode.cpp │ │ ├── NXMLNode.h │ │ ├── NXMLParser.cpp │ │ └── NXMLParser.h │ │ ├── Text │ │ ├── NFormat.cpp │ │ ├── NFormat.h │ │ ├── NFormat.inl │ │ ├── NString.cpp │ │ ├── NString.h │ │ ├── NString.inl │ │ ├── NStringComparator.cpp │ │ ├── NStringComparator.h │ │ ├── NStringEncoder.cpp │ │ ├── NStringEncoder.h │ │ ├── NStringEncoder.inl │ │ ├── NStringEncodings.h │ │ ├── NStringScanner.cpp │ │ ├── NStringScanner.h │ │ ├── NStringTransformer.cpp │ │ ├── NStringTransformer.h │ │ ├── NTextUtils.cpp │ │ ├── NTextUtils.h │ │ ├── NTextUtils.inl │ │ ├── NUnicodeView.cpp │ │ ├── NUnicodeView.h │ │ └── NUnicodeView.inl │ │ ├── Threads │ │ ├── NAsync.h │ │ ├── NAsync.inl │ │ ├── NAtomic.h │ │ ├── NAtomic.inl │ │ ├── NLockable.h │ │ ├── NLockable.inl │ │ ├── NMutex.cpp │ │ ├── NMutex.h │ │ ├── NMutex.inl │ │ ├── NReadWriteLock.cpp │ │ ├── NReadWriteLock.h │ │ ├── NRunLoop.cpp │ │ ├── NRunLoop.h │ │ ├── NRunLoopTask.h │ │ ├── NRunLoopTask.inl │ │ ├── NScopedLock.h │ │ ├── NScopedLock.inl │ │ ├── NSemaphore.cpp │ │ ├── NSemaphore.h │ │ ├── NSharedMutex.cpp │ │ ├── NSharedMutex.h │ │ ├── NSharedMutex.inl │ │ ├── NThread.cpp │ │ ├── NThread.h │ │ ├── NThread.inl │ │ ├── NThreadGroup.cpp │ │ ├── NThreadGroup.h │ │ ├── NThreadGroup.inl │ │ ├── NThreadID.h │ │ ├── NThreadID.inl │ │ ├── NThreadPool.cpp │ │ ├── NThreadPool.h │ │ ├── NThreadTask.h │ │ └── NThreadTask.inl │ │ ├── Time │ │ ├── NClock.cpp │ │ ├── NClock.h │ │ ├── NDate.cpp │ │ ├── NDate.h │ │ ├── NDate.inl │ │ ├── NDateFormatter.cpp │ │ ├── NDateFormatter.h │ │ ├── NTime.h │ │ ├── NTime.inl │ │ ├── NTimeUtils.cpp │ │ └── NTimeUtils.h │ │ └── Types │ │ ├── NAny.cpp │ │ ├── NAny.h │ │ ├── NAny.inl │ │ ├── NArray.cpp │ │ ├── NArray.h │ │ ├── NArray.inl │ │ ├── NBitVector.cpp │ │ ├── NBitVector.h │ │ ├── NBitVector.inl │ │ ├── NCache.h │ │ ├── NCache.inl │ │ ├── NDeque.h │ │ ├── NDeque.inl │ │ ├── NDictionary.cpp │ │ ├── NDictionary.h │ │ ├── NDictionary.inl │ │ ├── NFlags.h │ │ ├── NFlags.inl │ │ ├── NFunction.h │ │ ├── NMap.h │ │ ├── NMixinAppendable.h │ │ ├── NMixinAppendable.inl │ │ ├── NMixinAttributes.h │ │ ├── NMixinAttributes.inl │ │ ├── NMixinComparable.h │ │ ├── NMixinComparable.inl │ │ ├── NMixinContainer.h │ │ ├── NMixinContainer.inl │ │ ├── NMixinHashable.h │ │ ├── NMixinHashable.inl │ │ ├── NNumber.cpp │ │ ├── NNumber.h │ │ ├── NNumber.inl │ │ ├── NRange.h │ │ ├── NRange.inl │ │ ├── NSet.h │ │ ├── NURL.cpp │ │ ├── NURL.h │ │ ├── NURL.inl │ │ ├── NVariant.h │ │ └── NVariant.inl └── Support │ ├── CMake │ ├── Configuration │ │ ├── NanoCompilers.cmake │ │ ├── NanoEnvironment.cmake │ │ └── NanoTargets.cmake │ ├── Library │ │ ├── nano_build.cmake │ │ ├── nano_log.cmake │ │ └── nano_project.cmake │ └── Nano.cmake │ ├── Visual Studio │ ├── Nano.natvis │ ├── NanoCommon.vsprops │ ├── NanoDebug.vsprops │ └── NanoRelease.vsprops │ └── Xcode │ ├── Nano.py │ ├── Nano.xcconfig │ ├── Nano_iOS.xcconfig │ ├── Nano_macOS.xcconfig │ └── Nano_tvOS.xcconfig ├── NanoTest ├── Project │ ├── CMakeLists.txt │ └── NanoTest.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ └── xcschemes │ │ ├── NanoTest_iOS - Debug.xcscheme │ │ ├── NanoTest_iOS - Release.xcscheme │ │ ├── NanoTest_macOS - Debug.xcscheme │ │ ├── NanoTest_macOS - Release.xcscheme │ │ ├── NanoTest_tvOS - Debug.xcscheme │ │ └── NanoTest_tvOS - Release.xcscheme ├── Source │ ├── Benchmarks │ │ ├── BSharedMutex.cpp │ │ ├── BSizeOf.cpp │ │ └── BThreadPool.cpp │ ├── Internal │ │ └── Targets │ │ │ └── Windows │ │ │ ├── StdAfx.cpp │ │ │ └── StdAfx.h │ ├── Nanites │ │ ├── CoreFoundation │ │ │ ├── TCFArray.cpp │ │ │ ├── TCFData.cpp │ │ │ ├── TCFDate.cpp │ │ │ ├── TCFDictionary.cpp │ │ │ ├── TCFNumber.cpp │ │ │ ├── TCFObject.cpp │ │ │ ├── TCFString.cpp │ │ │ ├── TCFURL.cpp │ │ │ └── TCoreFoundation.cpp │ │ ├── CoreGraphics │ │ │ ├── TCGColor.cpp │ │ │ ├── TCGContext.cpp │ │ │ ├── TCGImage.cpp │ │ │ ├── TCGShading.cpp │ │ │ └── TCoreGraphics.cpp │ │ └── Windows │ │ │ └── TWindows.cpp │ ├── Nano │ │ ├── Application │ │ │ ├── TCommandLine.cpp │ │ │ ├── TPreference.cpp │ │ │ ├── TPreferenceFile.cpp │ │ │ ├── TPreferences.cpp │ │ │ ├── TUndoManager.cpp │ │ │ └── TUndoSource.cpp │ │ ├── Data │ │ │ ├── TData.cpp │ │ │ ├── TDataCipher.cpp │ │ │ ├── TDataCompressor.cpp │ │ │ ├── TDataDigest.cpp │ │ │ └── TDataEncoder.cpp │ │ ├── Debugging │ │ │ ├── TDebug.cpp │ │ │ ├── TDebugger.cpp │ │ │ ├── TLog.cpp │ │ │ ├── TLogOutput.cpp │ │ │ ├── TUsageBucket.cpp │ │ │ └── TUsageLog.cpp │ │ ├── Events │ │ │ ├── TBroadcast.cpp │ │ │ ├── TBroadcastQueue.cpp │ │ │ ├── TBroadcaster.cpp │ │ │ ├── TProgressable.cpp │ │ │ └── TReceiver.cpp │ │ ├── Files │ │ │ ├── TBundle.cpp │ │ │ ├── TDBHandle.cpp │ │ │ ├── TFile.cpp │ │ │ ├── TFileHandle.cpp │ │ │ ├── TFileInfo.cpp │ │ │ ├── TFileMap.cpp │ │ │ ├── TFilePath.cpp │ │ │ ├── TFileScanner.cpp │ │ │ ├── TFileUtils.cpp │ │ │ ├── TPropertyList.cpp │ │ │ ├── TUTI.cpp │ │ │ └── TUTIRegistry.cpp │ │ ├── Graphics │ │ │ ├── TColor.cpp │ │ │ ├── TGeomUtils.cpp │ │ │ ├── TImage.cpp │ │ │ ├── TPoint.cpp │ │ │ ├── TRectangle.cpp │ │ │ ├── TShape.cpp │ │ │ ├── TSize.cpp │ │ │ ├── TTransform.cpp │ │ │ └── TVector.cpp │ │ ├── Maths │ │ │ ├── TMathUtils.cpp │ │ │ ├── TRandom.cpp │ │ │ ├── TRandomGenerator.cpp │ │ │ ├── TUInt128.cpp │ │ │ └── TUInt128.imp │ │ ├── Network │ │ │ ├── TMessageClient.cpp │ │ │ ├── TMessageServer.cpp │ │ │ ├── TNetworkBrowser.cpp │ │ │ ├── TNetworkManager.cpp │ │ │ ├── TNetworkMessage.cpp │ │ │ ├── TNetworkService.cpp │ │ │ ├── TSocket.cpp │ │ │ ├── TURLRequest.cpp │ │ │ └── TURLResponse.cpp │ │ ├── Std │ │ │ ├── TStdAlgorithm.cpp │ │ │ ├── TStdContainer.cpp │ │ │ ├── TStdMath.cpp │ │ │ ├── TStdMemory.cpp │ │ │ └── TStdUtility.cpp │ │ ├── System │ │ │ ├── TByteSwap.cpp │ │ │ ├── TJSONEncoder.cpp │ │ │ ├── TLocale.cpp │ │ │ ├── TMachine.cpp │ │ │ ├── TPOSIX.cpp │ │ │ ├── TProcess.cpp │ │ │ ├── TSystem.cpp │ │ │ ├── TTask.cpp │ │ │ ├── TVersion.cpp │ │ │ ├── TXMLEncoder.cpp │ │ │ ├── TXMLNode.cpp │ │ │ └── TXMLParser.cpp │ │ ├── Text │ │ │ ├── TFormat.cpp │ │ │ ├── TString.cpp │ │ │ ├── TStringComparator.cpp │ │ │ ├── TStringEncoder.cpp │ │ │ ├── TStringScanner.cpp │ │ │ ├── TStringTransformer.cpp │ │ │ ├── TTextUtils.cpp │ │ │ └── TUnicodeView.cpp │ │ ├── Threads │ │ │ ├── TAsync.cpp │ │ │ ├── TAtomic.cpp │ │ │ ├── TLockable.cpp │ │ │ ├── TMutex.cpp │ │ │ ├── TReadWriteLock.cpp │ │ │ ├── TRunLoop.cpp │ │ │ ├── TRunLoopTask.cpp │ │ │ ├── TScopedLock.cpp │ │ │ ├── TSemaphore.cpp │ │ │ ├── TSharedMutex.cpp │ │ │ ├── TThread.cpp │ │ │ ├── TThreadGroup.cpp │ │ │ ├── TThreadID.cpp │ │ │ ├── TThreadPool.cpp │ │ │ └── TThreadTask.cpp │ │ ├── Time │ │ │ ├── TClock.cpp │ │ │ ├── TDate.cpp │ │ │ ├── TDateFormatter.cpp │ │ │ ├── TTime.cpp │ │ │ └── TTimeUtils.cpp │ │ └── Types │ │ │ ├── TAny.cpp │ │ │ ├── TArray.cpp │ │ │ ├── TBitVector.cpp │ │ │ ├── TCache.cpp │ │ │ ├── TDeque.cpp │ │ │ ├── TDictionary.cpp │ │ │ ├── TFlags.cpp │ │ │ ├── TFunction.cpp │ │ │ ├── TMap.cpp │ │ │ ├── TMixinAppendable.cpp │ │ │ ├── TMixinAttributes.cpp │ │ │ ├── TMixinComparable.cpp │ │ │ ├── TMixinContainer.cpp │ │ │ ├── TMixinHashable.cpp │ │ │ ├── TNumber.cpp │ │ │ ├── TRange.cpp │ │ │ ├── TSet.cpp │ │ │ ├── TURL.cpp │ │ │ └── TVariant.cpp │ ├── NanoTest Prefix.h │ └── NanoTest.cpp └── Support │ └── Xcode │ ├── NanoTest.xcconfig │ ├── NanoTest_iOS.xcconfig │ ├── NanoTest_macOS.xcconfig │ └── NanoTest_tvOS.xcconfig └── README.md /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | indent_size = 4 6 | indent_style = tab 7 | 8 | 9 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # GitHub 2 | Library/Source/Nano/Internal/Components/* linguist-vendored 3 | 4 | -------------------------------------------------------------------------------- /.github/workflows/Workflows.md: -------------------------------------------------------------------------------- 1 | # Workflows 2 | 3 | Workflows use matrices to build Debug and Release configurations for each platform. 4 | 5 | Ideally Test workflows would be triggered as a result of a Build workflow, however 6 | there are similar limitations in GitHub Actions that require a more complex setup: 7 | 8 | * Status badges require a separate workflow for each badge 9 | * Workflows cannot query the status of the workflow that triggered them 10 | * Workflow dependencies do not track matrices 11 | * A Test_Release workflow might be invoked after a Build_Debug workflow 12 | * A Test workflow cannot restart itself if its artifact has not been built yet 13 | 14 | To allow distinct status badges for Build vs Test we need separate workflows for each. 15 | 16 | As Test workflow matrix cannot reliably test the artifact produced by the prior Build 17 | workflow matrix each Test workflow builds the code again. -------------------------------------------------------------------------------- /.github/workflows/build_android.yml: -------------------------------------------------------------------------------- 1 | name: Build Android 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Build_Android: 9 | runs-on: ubuntu-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: Prepare NDK 20 | run: | 21 | sudo mkdir -p /usr/local/lib/android/sdk/ndk 22 | sudo chmod -R 777 /usr/local/lib/android/sdk/ndk 23 | sudo chown -R $USER:$USER /usr/local/lib/android/sdk/ndk 24 | 25 | - name: Cache NDK 26 | id: ndk-cache 27 | uses: actions/cache@v2 28 | with: 29 | path: /usr/local/lib/android/sdk/ndk 30 | key: ndk-cache-21.0.6113669-v2 31 | 32 | - name: Install NDK 33 | if: steps.ndk-cache.outputs.cache-hit != 'true' 34 | run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;21.0.6113669" | grep -v = || true 35 | 36 | - name: CMake 37 | run: | 38 | mkdir Build 39 | cd Build 40 | cmake -G "Unix Makefiles" \ 41 | -DANDROID_ABI=arm64-v8a \ 42 | -DANDROID_NATIVE_API_LEVEL=26 \ 43 | -DCMAKE_TOOLCHAIN_FILE="/usr/local/lib/android/sdk/ndk/21.0.6113669/build/cmake/android.toolchain.cmake" \ 44 | -DCMAKE_BUILD_TYPE="${{ matrix.config }}" \ 45 | "${GITHUB_WORKSPACE}" 46 | 47 | - name: Build 48 | run: | 49 | cd Build 50 | make -j2 "NanoTest" 51 | -------------------------------------------------------------------------------- /.github/workflows/build_ios.yml: -------------------------------------------------------------------------------- 1 | name: Build iOS 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Build_iOS: 9 | runs-on: macOS-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: Build 20 | run: | 21 | set -euf -o pipefail 22 | xcodebuild build \ 23 | -project Library/Project/Nano.xcodeproj \ 24 | -scheme "Nano_iOS - ${{ matrix.config }}" \ 25 | -destination "generic/platform=iOS" \ 26 | -parallelizeTargets \ 27 | Nano="${GITHUB_WORKSPACE}" \ 28 | SYMROOT="${GITHUB_WORKSPACE}/Build" | xcpretty 29 | -------------------------------------------------------------------------------- /.github/workflows/build_linux.yml: -------------------------------------------------------------------------------- 1 | name: Build Linux 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Build_Linux: 9 | runs-on: ubuntu-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: CMake 20 | run: | 21 | mkdir Build 22 | cd Build 23 | cmake -G "Unix Makefiles" \ 24 | -DCMAKE_BUILD_TYPE="${{ matrix.config }}" \ 25 | "${GITHUB_WORKSPACE}" 26 | 27 | - name: Build 28 | run: | 29 | cd Build 30 | make -j2 "NanoTest" 31 | -------------------------------------------------------------------------------- /.github/workflows/build_macos.yml: -------------------------------------------------------------------------------- 1 | name: Build_macOS 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Build_macOS: 9 | runs-on: macOS-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: Build 20 | run: | 21 | set -euf -o pipefail 22 | xcodebuild build \ 23 | -project NanoTest/Project/NanoTest.xcodeproj \ 24 | -scheme "NanoTest_macOS - ${{ matrix.config }}" \ 25 | -destination "generic/platform=macOS" \ 26 | -parallelizeTargets \ 27 | -enableAddressSanitizer YES \ 28 | -enableUndefinedBehaviorSanitizer YES \ 29 | Nano="${GITHUB_WORKSPACE}" \ 30 | SYMROOT="${GITHUB_WORKSPACE}/Build" | xcpretty 31 | 32 | -------------------------------------------------------------------------------- /.github/workflows/build_tvos.yml: -------------------------------------------------------------------------------- 1 | name: Build tvOS 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Build_tvOS: 9 | runs-on: macOS-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: Build 20 | run: | 21 | set -euf -o pipefail 22 | xcodebuild build \ 23 | -project Library/Project/Nano.xcodeproj \ 24 | -scheme "Nano_tvOS - ${{ matrix.config }}" \ 25 | -destination "generic/platform=tvOS" \ 26 | -parallelizeTargets \ 27 | Nano="${GITHUB_WORKSPACE}" \ 28 | SYMROOT="${GITHUB_WORKSPACE}/Build" | xcpretty 29 | -------------------------------------------------------------------------------- /.github/workflows/build_windows.yml: -------------------------------------------------------------------------------- 1 | name: Build Windows 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Build_Windows: 9 | runs-on: windows-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: CMake 20 | run: | 21 | mkdir Build 22 | cd Build 23 | cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE="${{ matrix.config }}" "$env:GITHUB_WORKSPACE" 24 | 25 | - name: Build 26 | run: | 27 | cd Build 28 | cmake --build . --parallel --config "${{ matrix.config }}" --target NanoTest 29 | -------------------------------------------------------------------------------- /.github/workflows/test_android.yml: -------------------------------------------------------------------------------- 1 | name: Test Android 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Test_Android: 9 | runs-on: ubuntu-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: Prepare NDK 20 | run: | 21 | sudo mkdir -p /usr/local/lib/android/sdk/ndk 22 | sudo chmod -R 777 /usr/local/lib/android/sdk/ndk 23 | sudo chown -R $USER:$USER /usr/local/lib/android/sdk/ndk 24 | 25 | - name: Cache NDK 26 | id: ndk-cache 27 | uses: actions/cache@v2 28 | with: 29 | path: /usr/local/lib/android/sdk/ndk 30 | key: ndk-cache-21.0.6113669-v2 31 | 32 | - name: Install NDK 33 | if: steps.ndk-cache.outputs.cache-hit != 'true' 34 | run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;21.0.6113669" | grep -v = || true 35 | 36 | - name: CMake 37 | run: | 38 | mkdir Build 39 | cd Build 40 | cmake -G "Unix Makefiles" \ 41 | -DANDROID_ABI=arm64-v8a \ 42 | -DANDROID_NATIVE_API_LEVEL=26 \ 43 | -DCMAKE_TOOLCHAIN_FILE="/usr/local/lib/android/sdk/ndk/21.0.6113669/build/cmake/android.toolchain.cmake" \ 44 | -DCMAKE_BUILD_TYPE="${{ matrix.config }}" \ 45 | "${GITHUB_WORKSPACE}" 46 | 47 | - name: Build 48 | run: | 49 | cd Build 50 | make -j2 "NanoTest" 51 | 52 | - name: Test 53 | run: | 54 | exit 1 55 | -------------------------------------------------------------------------------- /.github/workflows/test_ios.yml: -------------------------------------------------------------------------------- 1 | name: Test iOS 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Test_iOS: 9 | runs-on: macOS-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: Build 20 | run: | 21 | set -euf -o pipefail 22 | xcodebuild build \ 23 | -project Library/Project/Nano.xcodeproj \ 24 | -scheme "Nano_iOS - ${{ matrix.config }}" \ 25 | -destination "generic/platform=iOS" \ 26 | -parallelizeTargets \ 27 | Nano="${GITHUB_WORKSPACE}" \ 28 | SYMROOT="${GITHUB_WORKSPACE}/Build" | xcpretty 29 | 30 | - name: Test 31 | run: | 32 | exit 1 33 | -------------------------------------------------------------------------------- /.github/workflows/test_linux.yml: -------------------------------------------------------------------------------- 1 | name: Test Linux 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Test_Linux: 9 | runs-on: ubuntu-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: CMake 20 | run: | 21 | mkdir Build 22 | cd Build 23 | cmake -G "Unix Makefiles" \ 24 | -DCMAKE_BUILD_TYPE="${{ matrix.config }}" \ 25 | "${GITHUB_WORKSPACE}" 26 | 27 | - name: Build 28 | run: | 29 | cd Build 30 | make -j2 "NanoTest" 31 | 32 | - name: Test 33 | run: | 34 | cd Build 35 | "NanoTest/Project/NanoTest" 36 | -------------------------------------------------------------------------------- /.github/workflows/test_macos.yml: -------------------------------------------------------------------------------- 1 | name: Test_macOS 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Test_macOS: 9 | runs-on: macOS-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: Build 20 | run: | 21 | set -euf -o pipefail 22 | xcodebuild build \ 23 | -project NanoTest/Project/NanoTest.xcodeproj \ 24 | -scheme "NanoTest_macOS - ${{ matrix.config }}" \ 25 | -destination "generic/platform=macOS" \ 26 | -parallelizeTargets \ 27 | -enableAddressSanitizer YES \ 28 | -enableUndefinedBehaviorSanitizer YES \ 29 | Nano="${GITHUB_WORKSPACE}" \ 30 | SYMROOT="${GITHUB_WORKSPACE}/Build" | xcpretty 31 | 32 | - name: Test 33 | run: | 34 | "Build/${{ matrix.config }}/NanoTest_macOS" 35 | -------------------------------------------------------------------------------- /.github/workflows/test_tvos.yml: -------------------------------------------------------------------------------- 1 | name: Test tvOS 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Test_tvOS: 9 | runs-on: macOS-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: Build 20 | run: | 21 | set -euf -o pipefail 22 | xcodebuild build \ 23 | -project Library/Project/Nano.xcodeproj \ 24 | -scheme "Nano_tvOS - ${{ matrix.config }}" \ 25 | -destination "generic/platform=tvOS" \ 26 | -parallelizeTargets \ 27 | Nano="${GITHUB_WORKSPACE}" \ 28 | SYMROOT="${GITHUB_WORKSPACE}/Build" | xcpretty 29 | 30 | - name: Test 31 | run: | 32 | exit 1 33 | -------------------------------------------------------------------------------- /.github/workflows/test_windows.yml: -------------------------------------------------------------------------------- 1 | name: Test Windows 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | Test_Windows: 9 | runs-on: windows-latest 10 | 11 | strategy: 12 | matrix: 13 | config: ['Debug', 'Release'] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: CMake 20 | run: | 21 | mkdir Build 22 | cd Build 23 | cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE="${{ matrix.config }}" "$env:GITHUB_WORKSPACE" 24 | 25 | - name: Build 26 | run: | 27 | cd Build 28 | cmake --build . --parallel --config "${{ matrix.config }}" --target NanoTest 29 | 30 | - name: Test 31 | run: | 32 | cd Build 33 | "NanoTest\Project\${{ matrix.config }}\NanoTest.exe" 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # macOS 2 | *.DS_Store 3 | 4 | 5 | # Xcode 6 | *.mode1v3 7 | *.mode2v3 8 | *.pbxuser 9 | *.perspectivev3 10 | *.xcuserstate 11 | project.xcworkspace/ 12 | xcuserdata/ 13 | 14 | 15 | # Visual Studio 16 | *.idb 17 | *.ncb 18 | *.obj 19 | *.pdb 20 | *.suo 21 | *.user 22 | 23 | 24 | # Python 25 | *.pyc 26 | 27 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #============================================================================== 2 | # NAME: 3 | # CMakeLists.txt 4 | # 5 | # DESCRIPTION: 6 | # Nano CMake support. 7 | # 8 | # COPYRIGHT: 9 | # Copyright (c) 2006-2021, refNum Software 10 | # All rights reserved. 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions 14 | # are met: 15 | # 16 | # 1. Redistributions of source code must retain the above copyright 17 | # notice, this list of conditions and the following disclaimer. 18 | # 19 | # 2. Redistributions in binary form must reproduce the above copyright 20 | # notice, this list of conditions and the following disclaimer in the 21 | # documentation and/or other materials provided with the distribution. 22 | # 23 | # 3. Neither the name of the copyright holder nor the names of its 24 | # contributors may be used to endorse or promote products derived from 25 | # this software without specific prior written permission. 26 | # 27 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 28 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 29 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 30 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 31 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 32 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 33 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 34 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 35 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 37 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | #============================================================================== 39 | # Configuration 40 | #------------------------------------------------------------------------------ 41 | cmake_minimum_required(VERSION 3.19) 42 | 43 | project(Nano VERSION 4.0) 44 | 45 | include("${CMAKE_CURRENT_LIST_DIR}/Library/Support/CMake/Nano.cmake") 46 | 47 | 48 | 49 | 50 | 51 | #============================================================================== 52 | # Projects 53 | #------------------------------------------------------------------------------ 54 | add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Library/Project") 55 | add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/NanoTest/Project") 56 | -------------------------------------------------------------------------------- /Documentation/src/img/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refnum/Nano/dceb0907061f7845d8a3c662f309ca164e932e6f/Documentation/src/img/background.jpg -------------------------------------------------------------------------------- /Documentation/src/img/button_thin_cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refnum/Nano/dceb0907061f7845d8a3c662f309ca164e932e6f/Documentation/src/img/button_thin_cell.png -------------------------------------------------------------------------------- /Documentation/src/img/button_thin_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refnum/Nano/dceb0907061f7845d8a3c662f309ca164e932e6f/Documentation/src/img/button_thin_icons.png -------------------------------------------------------------------------------- /Documentation/src/img/page_body.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refnum/Nano/dceb0907061f7845d8a3c662f309ca164e932e6f/Documentation/src/img/page_body.png -------------------------------------------------------------------------------- /Documentation/src/img/page_footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refnum/Nano/dceb0907061f7845d8a3c662f309ca164e932e6f/Documentation/src/img/page_footer.png -------------------------------------------------------------------------------- /Documentation/src/img/page_strap_nano.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refnum/Nano/dceb0907061f7845d8a3c662f309ca164e932e6f/Documentation/src/img/page_strap_nano.jpg -------------------------------------------------------------------------------- /Documentation/src/img/page_strap_nano.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/refnum/Nano/dceb0907061f7845d8a3c662f309ca164e932e6f/Documentation/src/img/page_strap_nano.png -------------------------------------------------------------------------------- /Documentation/src/js/refnum.js: -------------------------------------------------------------------------------- 1 | function loadImage(theURL) 2 | { 3 | theImage = new Image; 4 | theImage.src = theURL; 5 | } 6 | 7 | 8 | function navSelect(theID) 9 | { 10 | document.getElementById(theID).setAttribute("class", "selected"); 11 | } 12 | 13 | 14 | var prevOnLoad = window.onload; 15 | window.onload = function() 16 | { 17 | if (prevOnLoad) 18 | prevOnLoad(); 19 | 20 | 21 | // Preload images 22 | if (document.domain != "") 23 | { 24 | loadImage("/src/img/nav_apps_hover.png"); 25 | loadImage("/src/img/nav_apps_selected.png"); 26 | loadImage("/src/img/nav_projects_hover.png"); 27 | loadImage("/src/img/nav_projects_selected.png"); 28 | loadImage("/src/img/nav_contact_hover.png"); 29 | loadImage("/src/img/nav_contact_selected.png"); 30 | loadImage("/src/img/nav_dev_hover.png"); 31 | loadImage("/src/img/nav_dev_selected.png"); 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | BSD License 2 | =========== 3 | Copyright (c) 2019, refNum Software 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | 3. Neither the name of the copyright holder nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /Library/Project/Nano.xcodeproj/xcshareddata/xcschemes/Nano_iOS - Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Library/Project/Nano.xcodeproj/xcshareddata/xcschemes/Nano_iOS - Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Library/Project/Nano.xcodeproj/xcshareddata/xcschemes/Nano_macOS - Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Library/Project/Nano.xcodeproj/xcshareddata/xcschemes/Nano_macOS - Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Library/Project/Nano.xcodeproj/xcshareddata/xcschemes/Nano_tvOS - Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Library/Project/Nano.xcodeproj/xcshareddata/xcschemes/Nano_tvOS - Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Library/Source/Nanites/CoreFoundation/NCFArray.inl: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NCFArray.inl 3 | 4 | DESCRIPTION: 5 | CFArrayRef wrapper. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | 43 | 44 | 45 | 46 | 47 | //============================================================================= 48 | // NCFArray::NCFArray : Constructor. 49 | //----------------------------------------------------------------------------- 50 | inline NCFArray::NCFArray(const NArray& theArray) 51 | { 52 | 53 | 54 | // Initialise ourselves 55 | SetArray(theArray); 56 | } 57 | -------------------------------------------------------------------------------- /Library/Source/Nanites/CoreFoundation/NCFDate.inl: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NCFDate.inl 3 | 4 | DESCRIPTION: 5 | CFDateRef wrapper. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | 43 | 44 | 45 | 46 | 47 | //============================================================================= 48 | // NCFDate::NCFDate : Constructor. 49 | //----------------------------------------------------------------------------- 50 | inline NCFDate::NCFDate(const NDate& theDate) 51 | { 52 | 53 | 54 | // Initialise ourselves 55 | SetDate(theDate); 56 | } 57 | 58 | 59 | 60 | 61 | 62 | //============================================================================= 63 | // NCFDate::NCFDate : Constructor. 64 | //----------------------------------------------------------------------------- 65 | inline NCFDate::NCFDate(const NTime& theTime) 66 | { 67 | 68 | 69 | // Initialise ourselves 70 | SetTime(theTime); 71 | } 72 | -------------------------------------------------------------------------------- /Library/Source/Nanites/CoreFoundation/NCFDictionary.inl: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NCFDictionary.inl 3 | 4 | DESCRIPTION: 5 | CFDictionaryRef wrapper. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | 43 | 44 | 45 | 46 | 47 | //============================================================================= 48 | // NCFDictionary::NCFDictionary : Constructor. 49 | //----------------------------------------------------------------------------- 50 | inline NCFDictionary::NCFDictionary(const NDictionary& theDictionary) 51 | { 52 | 53 | 54 | // Initialise ourselves 55 | SetDictionary(theDictionary); 56 | } 57 | -------------------------------------------------------------------------------- /Library/Source/Nanites/CoreFoundation/NCFNumber.inl: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NCFNumber.inl 3 | 4 | DESCRIPTION: 5 | CFNumberRef wrapper. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | 43 | 44 | 45 | 46 | 47 | //============================================================================= 48 | // NCFNumber::NCFNumber : Constructor. 49 | //----------------------------------------------------------------------------- 50 | inline NCFNumber::NCFNumber(const NNumber& theNumber) 51 | { 52 | 53 | 54 | // Initialise ourselves 55 | SetNumber(theNumber); 56 | } 57 | -------------------------------------------------------------------------------- /Library/Source/Nanites/CoreFoundation/NCFString.inl: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NCFString.inl 3 | 4 | DESCRIPTION: 5 | CFStringRef wrapper. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | 43 | 44 | 45 | 46 | 47 | //============================================================================= 48 | // NCFString::NCFString : Constructor. 49 | //----------------------------------------------------------------------------- 50 | inline NCFString::NCFString(const NString& theString) 51 | { 52 | 53 | 54 | // Initialise ourselves 55 | SetString(theString); 56 | } 57 | -------------------------------------------------------------------------------- /Library/Source/Nanites/CoreFoundation/NCFURL.inl: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NCFURL.inl 3 | 4 | DESCRIPTION: 5 | CFURLRef wrapper. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | 43 | 44 | 45 | 46 | 47 | //============================================================================= 48 | // NCFURL::NCFURL : Constructor. 49 | //----------------------------------------------------------------------------- 50 | inline NCFURL::NCFURL(const NURL& theURL) 51 | { 52 | 53 | 54 | // Initialise ourselves 55 | SetURL(theURL); 56 | } 57 | -------------------------------------------------------------------------------- /Library/Source/Nanites/Qt/NQt.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NQt.cpp 3 | 4 | DESCRIPTION: 5 | Qt support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NQt.h" 18 | 19 | 20 | 21 | 22 | 23 | //============================================================================ 24 | // Linker 25 | //---------------------------------------------------------------------------- 26 | void NQt_SuppressNoCodeLinkerWarning(void); 27 | void NQt_SuppressNoCodeLinkerWarning(void) 28 | { 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Library/Source/Nanites/Skia/NSkia.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NSkia.cpp 3 | 4 | DESCRIPTION: 5 | Skia support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NSkia.h" 18 | 19 | 20 | 21 | 22 | 23 | //============================================================================ 24 | // Linker 25 | //---------------------------------------------------------------------------- 26 | void NSkia_SuppressNoCodeLinkerWarning(void); 27 | void NSkia_SuppressNoCodeLinkerWarning(void) 28 | { 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Library/Source/Nanites/UIKit/NUIKit.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NUIKit.h 3 | 4 | DESCRIPTION: 5 | UIKit support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | #ifndef NUIKIT_HDR 15 | #define NUIKIT_HDR 16 | //============================================================================ 17 | // Include files 18 | //---------------------------------------------------------------------------- 19 | #include "NColor.h" 20 | 21 | 22 | 23 | 24 | 25 | //============================================================================ 26 | // Inline functions 27 | //---------------------------------------------------------------------------- 28 | // Nano to UIKit 29 | inline UIColor *ToUI(const NColor &theColor) 30 | { 31 | return([UIColor colorWithRed:theColor.GetRed() green:theColor.GetGreen() blue:theColor.GetBlue() alpha:theColor.GetAlpha()]); 32 | } 33 | 34 | 35 | 36 | // UIKit to Nano 37 | inline NColor ToNN(UIColor *theColor) 38 | { 39 | #if NN_DEBUG 40 | CGColorSpaceModel colorModel = CGColorSpaceGetModel(CGColorGetColorSpace(theColor.CGColor)); 41 | #endif 42 | const CGFloat *colorComps = CGColorGetComponents( theColor.CGColor); 43 | NIndex numComps = CGColorGetNumberOfComponents(theColor.CGColor); 44 | NColor nnColor; 45 | 46 | switch (numComps) { 47 | case 1: 48 | // Gray 49 | NN_ASSERT(colorModel == kCGColorSpaceModelMonochrome); 50 | nnColor.SetColor(colorComps[0], colorComps[0], colorComps[0]); 51 | break; 52 | 53 | case 2: 54 | // Gray + Alpha 55 | NN_ASSERT(colorModel == kCGColorSpaceModelMonochrome); 56 | nnColor.SetColor(colorComps[0], colorComps[0], colorComps[0], colorComps[1]); 57 | break; 58 | 59 | case 3: 60 | // RGB 61 | NN_ASSERT(colorModel == kCGColorSpaceModelRGB); 62 | nnColor.SetColor(colorComps[0], colorComps[1], colorComps[2]); 63 | break; 64 | 65 | case 4: 66 | // RGB + Alpha 67 | NN_ASSERT(colorModel == kCGColorSpaceModelRGB); 68 | nnColor.SetColor(colorComps[0], colorComps[1], colorComps[2], colorComps[3]); 69 | break; 70 | 71 | default: 72 | NN_LOG("Unknown colour model: %d (%d)", colorModel, numComps); 73 | break; 74 | } 75 | 76 | return(nnColor); 77 | } 78 | 79 | 80 | 81 | 82 | 83 | #endif // NUIKIT_HDR 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /Library/Source/Nanites/UIKit/NUIKit.mm: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NUIKit.mm 3 | 4 | DESCRIPTION: 5 | UIKit support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NUIKit.h" 18 | 19 | 20 | 21 | 22 | 23 | //============================================================================ 24 | // Linker 25 | //---------------------------------------------------------------------------- 26 | void NUIKit_SuppressNoCodeLinkerWarning(void); 27 | void NUIKit_SuppressNoCodeLinkerWarning(void) 28 | { 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Library/Source/Nano/Debugging/NDebugger.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NDebugger.cpp 3 | 4 | DESCRIPTION: 5 | Log system. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NDebugger.h" 43 | 44 | // Nano 45 | #include "NTextUtils.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // NUsageBucket::GetBacktraceID : Get a backtrace identifier. 53 | //----------------------------------------------------------------------------- 54 | NString NDebugger::GetBacktraceID(size_t skipFrames, size_t numFrames) 55 | { 56 | 57 | 58 | // Get the ID 59 | // 60 | // We increase skipFrames to skip ourselves. 61 | return NTextUtils::Join(GetBacktrace(skipFrames + 1, numFrames), " < "); 62 | } 63 | -------------------------------------------------------------------------------- /Library/Source/Nano/Debugging/NLogOutput.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NLogOutput.cpp 3 | 4 | DESCRIPTION: 5 | Log output. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NLogOutput.h" 43 | 44 | // Nano 45 | #include "NLog.h" 46 | 47 | // System 48 | #include 49 | 50 | 51 | 52 | 53 | 54 | //============================================================================= 55 | // NLogOutputConsole::LogMessage : Log a message. 56 | //----------------------------------------------------------------------------- 57 | void NLogOutputConsole::LogMessage(const NLogMessage& theMsg) 58 | { 59 | 60 | 61 | // Output the message 62 | fprintf(stderr, 63 | "%s %s %s %s %s %s\n", 64 | theMsg.tagLevel, 65 | theMsg.tagDate, 66 | theMsg.tagTime, 67 | theMsg.tagThread, 68 | theMsg.tagSource, 69 | theMsg.msgBuffer); 70 | } 71 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/Read Me.txt: -------------------------------------------------------------------------------- 1 | Components 2 | ========== 3 | This directory contains 3rd-party source code that is included with Nano but is 4 | covered by its own licence agreement. 5 | 6 | Any code in this area is under a licence that is at least as permissive as Nano's 7 | licence (e.g., is either public domain, also under the BSD licence, or under a 8 | compatible licence such as MIT). 9 | 10 | As such, it can be used as per Nano's source code with no additional requirements. 11 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/WjCryptLib-2.3.0/UNLICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/expat-2.4.1/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper 2 | Copyright (c) 2001-2019 Expat maintainers 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/expat-2.4.1/winconfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | __ __ _ 3 | ___\ \/ /_ __ __ _| |_ 4 | / _ \\ /| '_ \ / _` | __| 5 | | __// \| |_) | (_| | |_ 6 | \___/_/\_\ .__/ \__,_|\__| 7 | |_| XML parser 8 | 9 | Copyright (c) 2000 Clark Cooper 10 | Copyright (c) 2002 Greg Stein 11 | Copyright (c) 2005 Karl Waclawek 12 | Copyright (c) 2017-2021 Sebastian Pipping 13 | Licensed under the MIT license: 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining 16 | a copy of this software and associated documentation files (the 17 | "Software"), to deal in the Software without restriction, including 18 | without limitation the rights to use, copy, modify, merge, publish, 19 | distribute, sublicense, and/or sell copies of the Software, and to permit 20 | persons to whom the Software is furnished to do so, subject to the 21 | following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included 24 | in all copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 27 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 29 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 30 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 31 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 32 | USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | */ 34 | 35 | #ifndef WINCONFIG_H 36 | #define WINCONFIG_H 37 | 38 | #define WIN32_LEAN_AND_MEAN 39 | #include 40 | #undef WIN32_LEAN_AND_MEAN 41 | 42 | #include 43 | #include 44 | 45 | #endif /* ndef WINCONFIG_H */ 46 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/fast_float-1.1.2/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any 2 | person obtaining a copy of this software and associated 3 | documentation files (the "Software"), to deal in the 4 | Software without restriction, including without 5 | limitation the rights to use, copy, modify, merge, 6 | publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software 8 | is furnished to do so, subject to the following 9 | conditions: 10 | 11 | The above copyright notice and this permission notice 12 | shall be included in all copies or substantial portions 13 | of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 16 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 17 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 18 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 19 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/fast_float-1.1.2/fast_float.h: -------------------------------------------------------------------------------- 1 | #ifndef FASTFLOAT_FAST_FLOAT_H 2 | #define FASTFLOAT_FAST_FLOAT_H 3 | 4 | #include 5 | 6 | namespace fast_float { 7 | enum chars_format { 8 | scientific = 1<<0, 9 | fixed = 1<<2, 10 | hex = 1<<3, 11 | general = fixed | scientific 12 | }; 13 | 14 | 15 | struct from_chars_result { 16 | const char *ptr; 17 | std::errc ec; 18 | }; 19 | 20 | /** 21 | * This function parses the character sequence [first,last) for a number. It parses floating-point numbers expecting 22 | * a locale-indepent format equivalent to what is used by std::strtod in the default ("C") locale. 23 | * The resulting floating-point value is the closest floating-point values (using either float or double), 24 | * using the "round to even" convention for values that would otherwise fall right in-between two values. 25 | * That is, we provide exact parsing according to the IEEE standard. 26 | * 27 | * Given a successful parse, the pointer (`ptr`) in the returned value is set to point right after the 28 | * parsed number, and the `value` referenced is set to the parsed value. In case of error, the returned 29 | * `ec` contains a representative error, otherwise the default (`std::errc()`) value is stored. 30 | * 31 | * The implementation does not throw and does not allocate memory (e.g., with `new` or `malloc`). 32 | * 33 | * Like the C++17 standard, the `fast_float::from_chars` functions take an optional last argument of 34 | * the type `fast_float::chars_format`. It is a bitset value: we check whether 35 | * `fmt & fast_float::chars_format::fixed` and `fmt & fast_float::chars_format::scientific` are set 36 | * to determine whether we allowe the fixed point and scientific notation respectively. 37 | * The default is `fast_float::chars_format::general` which allows both `fixed` and `scientific`. 38 | */ 39 | template 40 | from_chars_result from_chars(const char *first, const char *last, 41 | T &value, chars_format fmt = chars_format::general) noexcept; 42 | 43 | } 44 | #include "parse_number.h" 45 | #endif // FASTFLOAT_FAST_FLOAT_H -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/fmt-8.0.0/LICENSE.rst: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 - present, Victor Zverovich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | --- Optional exception to the license --- 23 | 24 | As an exception, if, as a result of your compiling your source code, portions 25 | of this Software are embedded into a machine-executable object form of such 26 | source code, you may redistribute such embedded portions in such object form 27 | without including the above copyright and permission notices. 28 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/hopscotch-map-2.3.0/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Thibaut Goetghebuer-Planchon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/json-parser-1.1.0/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (C) 2012, 2013 James McLaughlin et al. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 | SUCH DAMAGE. 26 | 27 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/libb64-2.0.0/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright-Only Dedication (based on United States law) or Public Domain Certification 2 | 3 | The person or persons who have associated work with this document (the "Dedicator" or "Certifier") hereby either (a) certifies that, to the best of his knowledge, the work of authorship identified is in the public domain of the country from which the work is published, or (b) hereby dedicates whatever copyright the dedicators holds in the work of authorship identified below (the "Work") to the public domain. A certifier, moreover, dedicates any copyright interest he may have in the associated work, and for these purposes, is described as a "dedicator" below. 4 | 5 | A certifier has taken reasonable steps to verify the copyright status of this work. Certifier recognizes that his good faith efforts may not shield him from liability if in fact the work certified is not in the public domain. 6 | 7 | Dedicator makes this dedication for the benefit of the public at large and to the detriment of the Dedicator's heirs and successors. Dedicator intends this dedication to be an overt act of relinquishment in perpetuity of all present and future rights under copyright law, whether vested or contingent, in the Work. Dedicator understands that such relinquishment of all rights includes the relinquishment of all rights to enforce (by lawsuit or otherwise) those copyrights in the Work. 8 | 9 | Dedicator recognizes that, once placed in the public domain, the Work may be freely reproduced, distributed, transmitted, used, modified, built upon, or otherwise exploited by anyone for any purpose, commercial or non-commercial, and in any way, including by methods that have not yet been invented or conceived. 10 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/libb64-2.0.0/Nano_libb64.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | Nano_libb64.h 3 | 4 | DESCRIPTION: 5 | Nano libb64 support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | #ifndef NANO_LIBB64_H 40 | #define NANO_LIBB64_H 41 | //============================================================================= 42 | // Includes 43 | //----------------------------------------------------------------------------- 44 | // Nano 45 | #include "NanoMacros.h" 46 | 47 | 48 | // libb64 49 | #if defined(__cplusplus) 50 | extern "C" 51 | { 52 | #endif // defined(__cplusplus) 53 | 54 | #include "cdecode.h" 55 | #include "cencode.h" 56 | 57 | #if defined(__cplusplus) 58 | } 59 | #endif // defined(__cplusplus) 60 | 61 | 62 | 63 | 64 | 65 | //============================================================================= 66 | // libb64 67 | //----------------------------------------------------------------------------- 68 | NN_DIAGNOSTIC_IGNORE_CLANG("-Wimplicit-int-conversion"); 69 | 70 | 71 | 72 | #endif // NANO_LIBB64_H 73 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/libb64-2.0.0/ccommon.h: -------------------------------------------------------------------------------- 1 | /* 2 | ccommon.h - common header for encoding and decoding algorithm 3 | 4 | This is part of the libb64 project, and has been placed in the public domain. 5 | For details, see http://sourceforge.net/projects/libb64 6 | */ 7 | 8 | #ifndef BASE64_CCOMMON_H 9 | #define BASE64_CCOMMON_H 10 | 11 | #define BASE64_VER_MAJOR 2 12 | #define BASE64_VER_MINOR 0 13 | 14 | #ifndef HAVE_SIZE_T 15 | #ifdef _WIN32 16 | #include 17 | #elif defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) 18 | #include 19 | #else 20 | typedef unsigned long size_t; 21 | #endif 22 | #endif 23 | 24 | #endif /* BASE64_CCOMMON_H */ 25 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/libb64-2.0.0/cdecode.h: -------------------------------------------------------------------------------- 1 | /* 2 | cdecode.h - c header for a base64 decoding algorithm 3 | 4 | This is part of the libb64 project, and has been placed in the public domain. 5 | For details, see http://sourceforge.net/projects/libb64 6 | */ 7 | 8 | #ifndef BASE64_CDECODE_H 9 | #define BASE64_CDECODE_H 10 | 11 | #include "ccommon.h" 12 | 13 | #define BASE64_CDEC_VER_MAJOR 2 14 | #define BASE64_CDEC_VER_MINOR 0 15 | 16 | typedef enum 17 | { 18 | step_a, step_b, step_c, step_d 19 | } base64_decodestep; 20 | 21 | typedef struct 22 | { 23 | base64_decodestep step; 24 | char plainchar; 25 | } base64_decodestate; 26 | 27 | extern void base64_init_decodestate(base64_decodestate* state_in); 28 | 29 | extern size_t base64_decode_maxlength(size_t encode_len); 30 | 31 | extern int base64_decode_value(signed char value_in); 32 | extern size_t base64_decode_block(const char* code_in, const size_t length_in, void* plaintext_out, base64_decodestate* state_in); 33 | 34 | #endif /* BASE64_CDECODE_H */ 35 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/libb64-2.0.0/cencode.h: -------------------------------------------------------------------------------- 1 | /* 2 | cencode.h - c header for a base64 encoding algorithm 3 | 4 | This is part of the libb64 project, and has been placed in the public domain. 5 | For details, see http://sourceforge.net/projects/libb64 6 | */ 7 | 8 | #ifndef BASE64_CENCODE_H 9 | #define BASE64_CENCODE_H 10 | 11 | #include "ccommon.h" 12 | 13 | #define BASE64_CENC_VER_MAJOR 2 14 | #define BASE64_CENC_VER_MINOR 0 15 | 16 | typedef enum 17 | { 18 | step_A, step_B, step_C 19 | } base64_encodestep; 20 | 21 | #define BASE64_CENC_DEFCPL 0 22 | 23 | typedef struct 24 | { 25 | size_t stepcount; 26 | size_t chars_per_line; 27 | 28 | base64_encodestep step; 29 | 30 | int cflags; 31 | char result; 32 | } base64_encodestate; 33 | 34 | extern void base64_init_encodestate(base64_encodestate* state_in); 35 | 36 | extern size_t base64_encode_length(size_t plain_len, base64_encodestate* state_in); 37 | 38 | extern char base64_encode_value(signed char value_in); 39 | extern size_t base64_encode_block(const void* plaintext_in, const size_t length_in, char* code_out, base64_encodestate* state_in); 40 | extern size_t base64_encode_blockend(char* code_out, base64_encodestate* state_in); 41 | 42 | #endif /* BASE64_CENCODE_H */ 43 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/pcre2-10.37/Nano_pcre2.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | Nano_pcre2.h 3 | 4 | DESCRIPTION: 5 | Nano pcre2 support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | #ifndef NANO_PCRE2_H 40 | #define NANO_PCRE2_H 41 | //============================================================================= 42 | // Includes 43 | //----------------------------------------------------------------------------- 44 | // Nano 45 | #include "NanoMacros.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // pcre2 53 | //----------------------------------------------------------------------------- 54 | NN_DIAGNOSTIC_PUSH(); 55 | 56 | NN_DIAGNOSTIC_IGNORE_CLANG("-Wdisabled-macro-expansion"); 57 | 58 | #include "pcre2.h" 59 | 60 | NN_DIAGNOSTIC_POP(); 61 | 62 | 63 | 64 | #endif // NANO_PCRE2_H 65 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/sqlite-3.36.0/LICENSE.md: -------------------------------------------------------------------------------- 1 | The author disclaims copyright to this source code. In place of 2 | a legal notice, here is a blessing: 3 | 4 | * May you do good and not evil. 5 | * May you find forgiveness for yourself and forgive others. 6 | * May you share freely, never taking more than you give. 7 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/sqlite-3.36.0/Nano_sqlite3.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | Nano_sqlite3.h 3 | 4 | DESCRIPTION: 5 | Nano SQLite3 support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | #ifndef NANO_SQLITE3_H 40 | #define NANO_SQLITE3_H 41 | //============================================================================= 42 | // Includes 43 | //----------------------------------------------------------------------------- 44 | // Nano 45 | #include "NanoMacros.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // SQLite 53 | //----------------------------------------------------------------------------- 54 | NN_DIAGNOSTIC_PUSH(); 55 | NN_DIAGNOSTIC_IGNORE_CLANG("-Wreserved-id-macro"); 56 | 57 | #include "sqlite3.36.0.h" 58 | 59 | NN_DIAGNOSTIC_POP(); 60 | 61 | 62 | 63 | #endif // NANO_SQLITE3_H 64 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/xxHash-0.8.0/LICENSE: -------------------------------------------------------------------------------- 1 | xxHash Library 2 | Copyright (c) 2012-2020 Yann Collet 3 | All rights reserved. 4 | 5 | BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, this 14 | list of conditions and the following disclaimer in the documentation and/or 15 | other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 21 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 24 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | ---------------------------------------------------- 29 | 30 | xxhsum command line interface 31 | Copyright (c) 2013-2020 Yann Collet 32 | All rights reserved. 33 | 34 | GPL v2 License 35 | 36 | This program is free software; you can redistribute it and/or modify 37 | it under the terms of the GNU General Public License as published by 38 | the Free Software Foundation; either version 2 of the License, or 39 | (at your option) any later version. 40 | 41 | This program is distributed in the hope that it will be useful, 42 | but WITHOUT ANY WARRANTY; without even the implied warranty of 43 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 44 | GNU General Public License for more details. 45 | 46 | You should have received a copy of the GNU General Public License along 47 | with this program; if not, write to the Free Software Foundation, Inc., 48 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 49 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/zlib-1.2.11/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(file) 12 | gzFile file; 13 | { 14 | #ifndef NO_GZCOMPRESS 15 | gz_statep state; 16 | 17 | if (file == NULL) 18 | return Z_STREAM_ERROR; 19 | state = (gz_statep)file; 20 | 21 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 22 | #else 23 | return gzclose_r(file); 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Components/zlib-1.2.11/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/Android/AndroidNFileInfo.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | AndroidNFileInfo.cpp 3 | 4 | DESCRIPTION: 5 | Android file info. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NFileInfo.h" 43 | 44 | // Nano 45 | #include "NCommonLinux.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // NFileInfo::FetchState : Fetch the requested state. 53 | //----------------------------------------------------------------------------- 54 | bool NFileInfo::FetchState(NFileStateFlags theFlags) 55 | { 56 | 57 | 58 | // Fetch the state 59 | return NCommonLinux::FileGetState(mPath, theFlags, mValid, mState); 60 | } 61 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/Android/AndroidNRandom.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | AndroidNRandom.cpp 3 | 4 | DESCRIPTION: 5 | Android random numbers. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NRandom.h" 43 | 44 | // Nano 45 | #include "NCommonLinux.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // NRandom::GetSecureData : Get cryptographically-secure random data. 53 | //----------------------------------------------------------------------------- 54 | void NRandom::GetSecureData(size_t theSize, void* thePtr) 55 | { 56 | 57 | 58 | // Get the data 59 | return NCommonLinux::RandomSecureData(theSize, thePtr); 60 | } 61 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/Linux/LinuxNFileInfo.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | LinuxNFileInfo.cpp 3 | 4 | DESCRIPTION: 5 | Linux file info. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NFileInfo.h" 43 | 44 | // Nano 45 | #include "NCommonLinux.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // NFileInfo::FetchState : Fetch the requested state. 53 | //----------------------------------------------------------------------------- 54 | bool NFileInfo::FetchState(NFileStateFlags theFlags) 55 | { 56 | 57 | 58 | // Fetch the state 59 | return NCommonLinux::FileGetState(mPath, theFlags, mValid, mState); 60 | } 61 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/Linux/LinuxNRandom.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | LinuxNRandom.cpp 3 | 4 | DESCRIPTION: 5 | Linux random numbers. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NRandom.h" 43 | 44 | // Nano 45 | #include "NCommonLinux.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // NRandom::GetSecureData : Get cryptographically-secure random data. 53 | //----------------------------------------------------------------------------- 54 | void NRandom::GetSecureData(size_t theSize, void* thePtr) 55 | { 56 | 57 | 58 | // Get the data 59 | return NCommonLinux::RandomSecureData(theSize, thePtr); 60 | } 61 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/NTargetNetwork.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NTargetNetwork.h 3 | 4 | DESCRIPTION: 5 | Network support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | #ifndef NTARGET_NETWORK_HDR 15 | #define NTARGET_NETWORK_HDR 16 | //============================================================================ 17 | // Include files 18 | //---------------------------------------------------------------------------- 19 | #include "NURL.h" 20 | #include "NURLRequest.h" 21 | #include "NURLResponse.h" 22 | #include "NNetworkBrowser.h" 23 | #include "NNetworkService.h" 24 | #include "NSocket.h" 25 | 26 | 27 | 28 | 29 | 30 | //============================================================================ 31 | // Class declaration 32 | //---------------------------------------------------------------------------- 33 | class NTargetNetwork { 34 | public: 35 | // Is a URL reachable? 36 | static bool IsReachable(const NURL &theURL); 37 | 38 | 39 | // URL response 40 | static NURLResponseRef URLResponseCreate( NURLResponse *theResponse); 41 | static void URLResponseDestroy(NURLResponseRef theResponse); 42 | static void URLResponseStart( NURLResponseRef theResponse); 43 | static void URLResponseCancel( NURLResponseRef theResponse); 44 | 45 | 46 | // Services 47 | static bool ServicesAvailable(void); 48 | static NServiceAdvertiserRef ServiceAdvertiserCreate(const NString &serviceType, uint16_t thePort, const NString &theName); 49 | static void ServiceAdvertiserDestroy(NServiceAdvertiserRef theAdvertiser); 50 | static NServiceBrowserRef ServiceBrowserCreate(const NString &serviceType, const NNetworkBrowserEventFunctor &theFunctor); 51 | static void ServiceBrowserDestroy(NServiceBrowserRef theBrowser); 52 | 53 | 54 | // Sockets 55 | static NSocketRef SocketOpen( NSocket *theSocket, const NString &theHost, uint16_t thePort); 56 | static void SocketClose( NSocketRef theSocket); 57 | static bool SocketCanRead( NSocketRef theSocket); 58 | static bool SocketCanWrite( NSocketRef theSocket); 59 | static NIndex SocketRead( NSocketRef theSocket, NIndex theSize, void *thePtr); 60 | static NIndex SocketWrite( NSocketRef theSocket, NIndex theSize, const void *thePtr); 61 | static int32_t SocketGetOption(NSocketRef theSocket, NSocketOption theOption); 62 | static NStatus SocketSetOption(NSocketRef theSocket, NSocketOption theOption, int32_t theValue); 63 | }; 64 | 65 | 66 | 67 | 68 | 69 | #endif // NTARGET_NETWORK_HDR 70 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/NTargetSystem.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NTargetSystem.h 3 | 4 | DESCRIPTION: 5 | System support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | #ifndef NTARGET_SYSTEM_HDR 15 | #define NTARGET_SYSTEM_HDR 16 | //============================================================================ 17 | // Include files 18 | //---------------------------------------------------------------------------- 19 | #include "NSystemUtilities.h" 20 | #include "NString.h" 21 | #include "NLocale.h" 22 | #include "NVariant.h" 23 | #include "NImage.h" 24 | #include "NFile.h" 25 | #include "NTask.h" 26 | 27 | 28 | 29 | 30 | 31 | //============================================================================ 32 | // Constants 33 | //---------------------------------------------------------------------------- 34 | // Tasks 35 | typedef enum { 36 | kTaskKill, 37 | kTaskInterrupt 38 | } NTaskSignal; 39 | 40 | 41 | 42 | 43 | 44 | //============================================================================ 45 | // Class declaration 46 | //---------------------------------------------------------------------------- 47 | class NTargetSystem { 48 | public: 49 | // Emit a debug message 50 | static void DebugLog(const char *theMsg); 51 | 52 | 53 | // Find a bundle 54 | // 55 | // Returns the application bundle if bundleID is empty. 56 | static NFile FindBundle(const NString &bundleID); 57 | 58 | 59 | // Tasks 60 | static TaskInfo TaskCreate(const NString &theCmd, const NStringList &theArgs); 61 | static void TaskDestroy( TaskInfo &theTask); 62 | static void TaskUpdate( TaskInfo &theTask); 63 | static NString TaskRead( TaskInfo &theTask, bool stdErr=false); 64 | static void TaskWrite( const TaskInfo &theTask, const NString &theText); 65 | static void TaskWait( const TaskInfo &theTask, NTime waitFor); 66 | static void TaskSignal(const TaskInfo &theTask, NTaskSignal theSignal); 67 | 68 | 69 | // Locale 70 | static NVariant GetLocaleValue( const NString &theID, const NString &theKey); 71 | static NBroadcaster *GetLocaleBroadcaster(const NString &theID); 72 | 73 | 74 | // Strings 75 | static NString TransformString(const NString &theString, NStringTransform theTransform); 76 | 77 | 78 | // Images 79 | static NData ImageEncode(const NImage &theImage, const NUTI &theType); 80 | static NImage ImageDecode(const NData &theData); 81 | }; 82 | 83 | 84 | 85 | 86 | 87 | #endif // NTARGET_SYSTEM_HDR 88 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/Windows/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | StdAfx.cpp 3 | 4 | DESCRIPTION: 5 | Windows precompiled header. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "StdAfx.h" 43 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/Windows/StdAfx.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | StdAfx.h 3 | 4 | DESCRIPTION: 5 | Windows precompiled header. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "Nano Prefix.h" 43 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/iOS/NIOSNetwork.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NIOSNetwork.cpp 3 | 4 | DESCRIPTION: 5 | iOS network support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NTargetNetwork.h" 18 | 19 | 20 | 21 | 22 | 23 | //============================================================================ 24 | // NTargetNetwork : Shares implementation with Mac. 25 | //---------------------------------------------------------------------------- 26 | #include "../Mac/NMacNetwork.cpp" 27 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/iOS/NIOSSystem.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NIOSSystem.cpp 3 | 4 | DESCRIPTION: 5 | iOS system support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NTargetSystem.h" 18 | 19 | 20 | 21 | 22 | 23 | //============================================================================ 24 | // NTargetSystem : Shares implementation with Mac. 25 | //---------------------------------------------------------------------------- 26 | #include "../Mac/NMacSystem.cpp" 27 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/iOS/iOSNFileInfo.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | iOSNFileInfo.cpp 3 | 4 | DESCRIPTION: 5 | iOS file info. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NFileInfo.h" 43 | 44 | // Nano 45 | #include "NCommonDarwin.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // NFileInfo::FetchState : Fetch the requested state. 53 | //----------------------------------------------------------------------------- 54 | bool NFileInfo::FetchState(NFileStateFlags theFlags) 55 | { 56 | 57 | 58 | // Fetch the state 59 | return NCommonDarwin::FileGetState(mPath, theFlags, mValid, mState); 60 | } 61 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/iOS/iOSNRandom.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | iOSNRandom.cpp 3 | 4 | DESCRIPTION: 5 | iOS random numbers. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NRandom.h" 43 | 44 | // Nano 45 | #include "NCommonDarwin.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // NRandom::GetSecureData : Get cryptographically-secure random data. 53 | //----------------------------------------------------------------------------- 54 | void NRandom::GetSecureData(size_t theSize, void* thePtr) 55 | { 56 | 57 | 58 | // Get the data 59 | return NCommonDarwin::RandomSecureData(theSize, thePtr); 60 | } 61 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/macOS/macOSNFileInfo.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | macOSNFileInfo.cpp 3 | 4 | DESCRIPTION: 5 | macOS file info. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NFileInfo.h" 43 | 44 | // Nano 45 | #include "NCommonDarwin.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // NFileInfo::FetchState : Fetch the requested state. 53 | //----------------------------------------------------------------------------- 54 | bool NFileInfo::FetchState(NFileStateFlags theFlags) 55 | { 56 | 57 | 58 | // Fetch the state 59 | return NCommonDarwin::FileGetState(mPath, theFlags, mValid, mState); 60 | } 61 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/macOS/macOSNRandom.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | macOSNRandom.cpp 3 | 4 | DESCRIPTION: 5 | macOS random numbers. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NRandom.h" 43 | 44 | // Nano 45 | #include "NCommonDarwin.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // NRandom::GetSecureData : Get cryptographically-secure random data. 53 | //----------------------------------------------------------------------------- 54 | void NRandom::GetSecureData(size_t theSize, void* thePtr) 55 | { 56 | 57 | 58 | // Get the data 59 | return NCommonDarwin::RandomSecureData(theSize, thePtr); 60 | } 61 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/tvOS/tvOSNFileInfo.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | tvOSNFileInfo.cpp 3 | 4 | DESCRIPTION: 5 | tvOS file info. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NFileInfo.h" 43 | 44 | // Nano 45 | #include "NCommonDarwin.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // NFileInfo::FetchState : Fetch the requested state. 53 | //----------------------------------------------------------------------------- 54 | bool NFileInfo::FetchState(NFileStateFlags theFlags) 55 | { 56 | 57 | 58 | // Fetch the state 59 | return NCommonDarwin::FileGetState(mPath, theFlags, mValid, mState); 60 | } 61 | -------------------------------------------------------------------------------- /Library/Source/Nano/Internal/Targets/tvOS/tvOSNRandom.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | tvOSNRandom.cpp 3 | 4 | DESCRIPTION: 5 | tvOS random numbers. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NRandom.h" 43 | 44 | // Nano 45 | #include "NCommonDarwin.h" 46 | 47 | 48 | 49 | 50 | 51 | //============================================================================= 52 | // NRandom::GetSecureData : Get cryptographically-secure random data. 53 | //----------------------------------------------------------------------------- 54 | void NRandom::GetSecureData(size_t theSize, void* thePtr) 55 | { 56 | 57 | 58 | // Get the data 59 | return NCommonDarwin::RandomSecureData(theSize, thePtr); 60 | } 61 | -------------------------------------------------------------------------------- /Library/Source/Nano/Maths/NMathUtils.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NMathUtils.cpp 3 | 4 | DESCRIPTION: 5 | Math utilities. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NMathUtils.h" 43 | -------------------------------------------------------------------------------- /Library/Source/Nano/Nano Prefix.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | Nano Prefix.h 3 | 4 | DESCRIPTION: 5 | Nano prefix header. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | #ifndef NANO_PREFIX_H 40 | #define NANO_PREFIX_H 41 | //============================================================================= 42 | // Macros 43 | //----------------------------------------------------------------------------- 44 | // Expat 45 | #define XML_STATIC 1 46 | 47 | 48 | // PCRE 49 | #define HAVE_CONFIG_H 1 50 | #define PCRE2_CODE_UNIT_WIDTH 8 51 | #define PCRE2_STATIC 1 52 | 53 | 54 | // SQLite 55 | #define SQLITE_ENABLE_MEMORY_MANAGEMENT 1 56 | #define SQLITE_THREADSAFE 1 57 | 58 | #if NN_DEBUG 59 | #define SQLITE_DEBUG 1 60 | #else 61 | #define NDEBUG 1 62 | #endif 63 | 64 | 65 | 66 | #endif // NANO_PREFIX_H 67 | -------------------------------------------------------------------------------- /Library/Source/Nano/Network/NNetworkManager.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NNetworkManager.h 3 | 4 | DESCRIPTION: 5 | Network manager. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | #ifndef NNETWORKMANAGER_HDR 15 | #define NNETWORKMANAGER_HDR 16 | //============================================================================ 17 | // Include files 18 | //---------------------------------------------------------------------------- 19 | #include "NURL.h" 20 | #include "NURLRequest.h" 21 | #include "NURLResponse.h" 22 | #include "NSingleton.h" 23 | 24 | 25 | 26 | 27 | 28 | //============================================================================ 29 | // Class declaration 30 | //---------------------------------------------------------------------------- 31 | class NNetworkManager : public NSingleton { 32 | public: 33 | NNetworkManager(void); 34 | virtual ~NNetworkManager(void); 35 | 36 | 37 | // Is a URL reachable? 38 | bool IsReachable(const NURL &theURL); 39 | 40 | 41 | // Get/set the user agent 42 | NString GetUserAgent(void) const; 43 | void SetUserAgent(const NString &userAgent); 44 | 45 | 46 | // Get the instance 47 | static NNetworkManager *Get(void); 48 | 49 | 50 | private: 51 | NString GetDefaultUserAgent(void); 52 | 53 | 54 | private: 55 | NString mUserAgent; 56 | }; 57 | 58 | 59 | 60 | 61 | 62 | #endif // NNETWORKMANAGER_HDR 63 | 64 | 65 | -------------------------------------------------------------------------------- /Library/Source/Nano/Network/NURLRequest.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NURLRequest.h 3 | 4 | DESCRIPTION: 5 | URL request. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | #ifndef NURLREQUEST_HDR 15 | #define NURLREQUEST_HDR 16 | //============================================================================ 17 | // Include files 18 | //---------------------------------------------------------------------------- 19 | #include "NPropertyStore.h" 20 | #include "NURL.h" 21 | 22 | 23 | 24 | 25 | 26 | //============================================================================ 27 | // Constants 28 | //---------------------------------------------------------------------------- 29 | // Keys 30 | static const NString kNURLRequestUserAgentKey = "User-Agent"; 31 | static const NString kNURLRequestBodyKey = "http*body"; 32 | 33 | 34 | // Commands 35 | typedef enum { 36 | kURLGet, 37 | kURLHead, 38 | kURLPost 39 | } NURLCommand; 40 | 41 | 42 | 43 | 44 | 45 | //============================================================================ 46 | // Class declaration 47 | //---------------------------------------------------------------------------- 48 | class NURLRequest : public NPropertyStore { 49 | public: 50 | NURLRequest(const NURL &theURL=""); 51 | virtual ~NURLRequest(void); 52 | 53 | 54 | // Is the request valid? 55 | bool IsValid(void) const; 56 | 57 | 58 | // Get/set the URL 59 | NURL GetURL(void) const; 60 | void SetURL(const NURL &theURL); 61 | 62 | 63 | // Get/set the command 64 | NURLCommand GetCommand(void) const; 65 | void SetCommand(NURLCommand theCmd); 66 | 67 | 68 | private: 69 | NURL mURL; 70 | NURLCommand mCmd; 71 | }; 72 | 73 | 74 | 75 | 76 | #endif // NURLREQUEST_HDR 77 | 78 | 79 | -------------------------------------------------------------------------------- /Library/Source/Nano/Std/NStdMemory.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NStdMemory.h 3 | 4 | DESCRIPTION: 5 | STL memory extensions. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | #ifndef NSTD_MEMORY_H 40 | #define NSTD_MEMORY_H 41 | //============================================================================= 42 | // Includes 43 | //----------------------------------------------------------------------------- 44 | #include 45 | 46 | namespace nstd 47 | { 48 | 49 | 50 | 51 | 52 | 53 | //============================================================================= 54 | // nstd::aligned_to : Is a value aligned? 55 | //----------------------------------------------------------------------------- 56 | template 57 | constexpr bool aligned_to(A theValue, B theAlignment) noexcept 58 | { 59 | return (uintptr_t(theValue) % uintptr_t(theAlignment)) == 0; 60 | } 61 | 62 | 63 | 64 | } // namespace nstd 65 | 66 | #endif // NSTD_MEMORY_H 67 | -------------------------------------------------------------------------------- /Library/Source/Nano/System/NJSONEncoder.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NJSONEncoder.h 3 | 4 | DESCRIPTION: 5 | JSON encoder. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | #ifndef NJSONENCODER_HDR 15 | #define NJSONENCODER_HDR 16 | //============================================================================ 17 | // Include files 18 | //---------------------------------------------------------------------------- 19 | #include "NDictionary.h" 20 | 21 | 22 | 23 | 24 | 25 | //============================================================================ 26 | // Types 27 | //---------------------------------------------------------------------------- 28 | // Structs 29 | typedef struct _json_value *json_value_ptr; 30 | 31 | 32 | 33 | 34 | 35 | //============================================================================ 36 | // Class declaration 37 | //---------------------------------------------------------------------------- 38 | class NJSONEncoder { 39 | public: 40 | NJSONEncoder(void); 41 | virtual ~NJSONEncoder(void); 42 | 43 | 44 | // Encode/decode a JSON document 45 | // 46 | // If an error occurs during parsing, an empty string/NULL node is returned. 47 | NString Encode(const NVariant &theValue); 48 | NVariant Decode(const NString &theJSON); 49 | 50 | 51 | private: 52 | NString EncodeValue( const NVariant &theValue, const NString &theIndent); 53 | NString EncodeBoolean( bool theValuet); 54 | NString EncodeNumber( const NNumber &theValuet); 55 | NString EncodeString( const NString &theValuet); 56 | NString EncodeArray( const NArray &theValue, const NString &theIndent); 57 | NString EncodeDictionary(const NDictionary &theValue, const NString &theIndent); 58 | 59 | NVariant DecodeValue( const json_value_ptr jsonValue); 60 | bool DecodeBoolean( const json_value_ptr jsonValue); 61 | int64_t DecodeInteger( const json_value_ptr jsonValue); 62 | float64_t DecodeReal( const json_value_ptr jsonValue); 63 | NString DecodeString( const json_value_ptr jsonValue); 64 | NArray DecodeArray( const json_value_ptr jsonValue); 65 | NDictionary DecodeDictionary(const json_value_ptr jsonValue); 66 | 67 | 68 | private: 69 | 70 | }; 71 | 72 | 73 | 74 | #endif // NJSONENCODER_HDR 75 | -------------------------------------------------------------------------------- /Library/Source/Nano/System/NLocale.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NLocale.h 3 | 4 | DESCRIPTION: 5 | System locale. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | #ifndef NLOCALE_HDR 15 | #define NLOCALE_HDR 16 | //============================================================================ 17 | // Include files 18 | //---------------------------------------------------------------------------- 19 | #include "NBroadcaster.h" 20 | #include "NListener.h" 21 | #include "NString.h" 22 | 23 | 24 | 25 | 26 | 27 | //============================================================================ 28 | // Constants 29 | //---------------------------------------------------------------------------- 30 | // Messages 31 | static const NBroadcastMsg kMsgNLocaleModified = 0x6C6D6F64; // 'lmod' 32 | 33 | extern const NString kNLocaleChangedAllKey; 34 | extern const NString kNLocaleIsMetricKey; 35 | 36 | 37 | // Locales 38 | static const NString kNLocaleUser = "*user*"; 39 | 40 | 41 | 42 | 43 | 44 | //============================================================================ 45 | // Class declaration 46 | //---------------------------------------------------------------------------- 47 | class NLocale : public NBroadcaster, 48 | public NListener { 49 | public: 50 | NLocale(const NString &theID=kNLocaleUser); 51 | virtual ~NLocale(void); 52 | 53 | 54 | // Is the measurement system metric? 55 | bool IsMetric(void) const; 56 | 57 | 58 | protected: 59 | // Handle messages 60 | void DoMessage(NBroadcastMsg theMsg, const void *msgData); 61 | 62 | 63 | private: 64 | NVariant GetValue(const NString &theKey) const; 65 | 66 | 67 | private: 68 | NString mID; 69 | }; 70 | 71 | 72 | 73 | 74 | 75 | #endif // NLOCALE_HDR 76 | 77 | 78 | -------------------------------------------------------------------------------- /Library/Source/Nano/System/NProcess.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NProcess.cpp 3 | 4 | DESCRIPTION: 5 | Process support. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NProcess.h" 43 | -------------------------------------------------------------------------------- /Library/Source/Nano/Threads/NReadWriteLock.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NReadWriteLock.h 3 | 4 | DESCRIPTION: 5 | Read/write lock. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | #ifndef NREADWRITELOCK_HDR 15 | #define NREADWRITELOCK_HDR 16 | //============================================================================ 17 | // Include files 18 | //---------------------------------------------------------------------------- 19 | #include "NMutex.h" 20 | 21 | 22 | 23 | 24 | 25 | //============================================================================ 26 | // Class declaration 27 | //---------------------------------------------------------------------------- 28 | class NReadWriteLock : public NLock { 29 | public: 30 | NReadWriteLock(void); 31 | virtual ~NReadWriteLock(void); 32 | 33 | 34 | // Acquire/release the lock for writing 35 | // 36 | // A single thread may acquire the lock for writing. 37 | bool Lock(NTime waitFor=kNTimeForever); 38 | void Unlock(void); 39 | 40 | 41 | // Acquire/release the lock for reading 42 | // 43 | // Multiple threads may acquire the lock for reading. 44 | // 45 | // Readers take priority, and excessive readers may starve the writers. 46 | bool LockForRead(NTime waitFor=kNTimeForever); 47 | void UnlockForRead(void); 48 | 49 | 50 | private: 51 | NIndex mNumReaders; 52 | NMutex mLockReaders; 53 | NMutex mLockWriters; 54 | }; 55 | 56 | 57 | 58 | 59 | 60 | 61 | #endif // NREADWRITELOCK_HDR 62 | 63 | 64 | -------------------------------------------------------------------------------- /Library/Source/Nano/Threads/NSharedMutex.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NSharedMutex.cpp 3 | 4 | DESCRIPTION: 5 | Shared mutex. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NSharedMutex.h" 43 | -------------------------------------------------------------------------------- /Library/Source/Nano/Threads/NThreadGroup.inl: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NThreadGroup.inl 3 | 4 | DESCRIPTION: 5 | Thread pool group. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | 43 | 44 | 45 | 46 | 47 | //============================================================================= 48 | // NThreadGroup::AddEach : Add tasks to the group. 49 | //----------------------------------------------------------------------------- 50 | template 51 | void NThreadGroup::AddEach(const Container& theContainer, 52 | const Function& theFunction, 53 | NThreadPool* thePool) 54 | { 55 | 56 | 57 | // Add the tasks 58 | for (const auto& theItem : theContainer) 59 | { 60 | Add( 61 | [=]() 62 | { 63 | theFunction(theItem); 64 | }, 65 | thePool); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Library/Source/Nano/Types/NMixinContainer.inl: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NMixinContainer.inl 3 | 4 | DESCRIPTION: 5 | Mix-in for container objects. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | 43 | 44 | 45 | 46 | 47 | //============================================================================= 48 | // NMixinContainer::IsEmpty : Is the container empty? 49 | //----------------------------------------------------------------------------- 50 | template 51 | constexpr bool NMixinContainer::IsEmpty() const 52 | { 53 | const T& thisObject = static_cast(*this); 54 | 55 | return thisObject.GetSize() == 0; 56 | } 57 | -------------------------------------------------------------------------------- /Library/Support/CMake/Nano.cmake: -------------------------------------------------------------------------------- 1 | #============================================================================== 2 | # NAME: 3 | # Nano.cmake 4 | # 5 | # DESCRIPTION: 6 | # CMake builds. 7 | # 8 | # COPYRIGHT: 9 | # Copyright (c) 2006-2021, refNum Software 10 | # All rights reserved. 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions 14 | # are met: 15 | # 16 | # 1. Redistributions of source code must retain the above copyright 17 | # notice, this list of conditions and the following disclaimer. 18 | # 19 | # 2. Redistributions in binary form must reproduce the above copyright 20 | # notice, this list of conditions and the following disclaimer in the 21 | # documentation and/or other materials provided with the distribution. 22 | # 23 | # 3. Neither the name of the copyright holder nor the names of its 24 | # contributors may be used to endorse or promote products derived from 25 | # this software without specific prior written permission. 26 | # 27 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 28 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 29 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 30 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 31 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 32 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 33 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 34 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 35 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 37 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | #============================================================================== 39 | # Includes 40 | #------------------------------------------------------------------------------ 41 | # Configuration 42 | include("${CMAKE_CURRENT_LIST_DIR}/Library/nano_log.cmake") 43 | include("${CMAKE_CURRENT_LIST_DIR}/Configuration/NanoTargets.cmake") 44 | include("${CMAKE_CURRENT_LIST_DIR}/Configuration/NanoEnvironment.cmake") 45 | include("${CMAKE_CURRENT_LIST_DIR}/Configuration/NanoCompilers.cmake") 46 | 47 | 48 | # Library 49 | include("${CMAKE_CURRENT_LIST_DIR}/Library/nano_project.cmake") 50 | include("${CMAKE_CURRENT_LIST_DIR}/Library/nano_build.cmake") 51 | -------------------------------------------------------------------------------- /Library/Support/Visual Studio/NanoCommon.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 8 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Library/Support/Visual Studio/NanoDebug.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /Library/Support/Visual Studio/NanoRelease.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 9 | 16 | 17 | -------------------------------------------------------------------------------- /Library/Support/Xcode/Nano_iOS.xcconfig: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // iOS 3 | //----------------------------------------------------------------------------- 4 | NANO_PLATFORM = iOS 5 | 6 | IPHONEOS_DEPLOYMENT_TARGET = 13.0 7 | SUPPORTED_PLATFORMS = iphoneos 8 | 9 | #include "Nano.xcconfig" 10 | 11 | -------------------------------------------------------------------------------- /Library/Support/Xcode/Nano_macOS.xcconfig: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // macOS 3 | //----------------------------------------------------------------------------- 4 | NANO_PLATFORM = macOS 5 | 6 | MACOSX_DEPLOYMENT_TARGET = 10.15 7 | SUPPORTED_PLATFORMS = macosx 8 | 9 | #include "Nano.xcconfig" 10 | 11 | -------------------------------------------------------------------------------- /Library/Support/Xcode/Nano_tvOS.xcconfig: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // tvOS 3 | //----------------------------------------------------------------------------- 4 | NANO_PLATFORM = tvOS 5 | 6 | TVOS_DEPLOYMENT_TARGET = 14.0 7 | SUPPORTED_PLATFORMS = appletvos 8 | 9 | #include "Nano.xcconfig" 10 | 11 | -------------------------------------------------------------------------------- /NanoTest/Source/Internal/Targets/Windows/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | StdAfx.cpp 3 | 4 | DESCRIPTION: 5 | Windows precompiled header. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "StdAfx.h" 18 | -------------------------------------------------------------------------------- /NanoTest/Source/Internal/Targets/Windows/StdAfx.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | StdAfx.h 3 | 4 | DESCRIPTION: 5 | Windows precompiled header. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NanoTest Prefix.h" 18 | -------------------------------------------------------------------------------- /NanoTest/Source/Nanites/CoreGraphics/TCGContext.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TCGContext.cpp 3 | 4 | DESCRIPTION: 5 | NCGContext tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NCGContext.h" 43 | #include "NTestFixture.h" 44 | 45 | 46 | 47 | 48 | 49 | //============================================================================= 50 | // Test Fixture 51 | //----------------------------------------------------------------------------- 52 | NANO_FIXTURE(TCGContext) 53 | { 54 | NCGContext cgContext; 55 | }; 56 | 57 | 58 | 59 | 60 | 61 | //============================================================================= 62 | // Test Case 63 | //----------------------------------------------------------------------------- 64 | NANO_TEST(TCGContext, "Default") 65 | { 66 | 67 | 68 | // Perform the test 69 | REQUIRE(!cgContext.IsValid()); 70 | } 71 | -------------------------------------------------------------------------------- /NanoTest/Source/Nanites/Windows/TWindows.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TWindows.cpp 3 | 4 | DESCRIPTION: 5 | NWindows tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NTestFixture.h" 43 | #include "NWindows.h" 44 | 45 | 46 | 47 | 48 | 49 | //============================================================================= 50 | // Test Fixture 51 | //----------------------------------------------------------------------------- 52 | NANO_FIXTURE(TWindows){}; 53 | 54 | 55 | 56 | 57 | 58 | //============================================================================= 59 | // Test Case 60 | //----------------------------------------------------------------------------- 61 | NANO_TEST(TWindows, "TODO") 62 | { 63 | 64 | 65 | // Perform the test 66 | // dair, TODO 67 | } 68 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Application/TUndoSource.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TUndoSource.cpp 3 | 4 | DESCRIPTION: 5 | NUndoSource tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NTestFixture.h" 43 | #include "NUndoSource.h" 44 | 45 | 46 | 47 | 48 | 49 | //============================================================================= 50 | // Test Fixture 51 | //----------------------------------------------------------------------------- 52 | NANO_FIXTURE(TUndoSource) 53 | { 54 | NUndoSource undoSource; 55 | }; 56 | 57 | 58 | 59 | 60 | 61 | //============================================================================= 62 | // Test Case 63 | //----------------------------------------------------------------------------- 64 | NANO_TEST(TUndoSource, "Default") 65 | { 66 | } 67 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Debugging/TLog.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TLog.cpp 3 | 4 | DESCRIPTION: 5 | NLog tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | // Nano 43 | #include "NLog.h" 44 | #include "NTestFixture.h" 45 | 46 | 47 | 48 | 49 | 50 | //============================================================================= 51 | // Fixture 52 | //----------------------------------------------------------------------------- 53 | NANO_FIXTURE(TLog){}; 54 | 55 | 56 | 57 | 58 | 59 | //============================================================================= 60 | // Test Case 61 | //----------------------------------------------------------------------------- 62 | NANO_TEST(TLog, "Default") 63 | { 64 | } 65 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Debugging/TLogOutput.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TLogOutput.cpp 3 | 4 | DESCRIPTION: 5 | NLogOutput tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | // Nano 43 | #include "NLog.h" 44 | #include "NTestFixture.h" 45 | 46 | 47 | 48 | 49 | 50 | //============================================================================= 51 | // Fixture 52 | //----------------------------------------------------------------------------- 53 | NANO_FIXTURE(TLogOutputConsole) 54 | { 55 | NLogOutputConsole theOutput; 56 | }; 57 | 58 | 59 | 60 | 61 | 62 | //============================================================================= 63 | // Test Case 64 | //----------------------------------------------------------------------------- 65 | NANO_TEST(TLogOutputConsole, "Default") 66 | { 67 | } 68 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Debugging/TUsageLog.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TUsageLog.cpp 3 | 4 | DESCRIPTION: 5 | NUsageLog tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | // Nano 43 | #include "NTestFixture.h" 44 | #include "NUsageLog.h" 45 | 46 | 47 | 48 | 49 | 50 | //============================================================================= 51 | // Fixture 52 | //----------------------------------------------------------------------------- 53 | NANO_FIXTURE(NUsageLog){}; 54 | 55 | 56 | 57 | 58 | 59 | //============================================================================= 60 | // Test Case 61 | //----------------------------------------------------------------------------- 62 | NANO_TEST(NUsageLog, "Default") 63 | { 64 | 65 | 66 | // Perform the test 67 | (void) NUsageLog::Get(); 68 | } 69 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Files/TDBHandle.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TDBHandle.cpp 3 | 4 | DESCRIPTION: 5 | NDBHandle tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NDBHandle.h" 43 | #include "NTestFixture.h" 44 | 45 | 46 | 47 | 48 | 49 | //============================================================================= 50 | // Test Fixture 51 | //----------------------------------------------------------------------------- 52 | NANO_FIXTURE(TDBHandle) 53 | { 54 | NDBHandle dbHandle; 55 | }; 56 | 57 | 58 | 59 | 60 | 61 | //============================================================================= 62 | // Test Case 63 | //----------------------------------------------------------------------------- 64 | NANO_TEST(TDBHandle, "Default") 65 | { 66 | 67 | 68 | // Perform the test 69 | REQUIRE(!dbHandle.IsOpen()); 70 | } 71 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Graphics/TShape.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TShape.cpp 3 | 4 | DESCRIPTION: 5 | NShape tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NShape.h" 43 | #include "NTestFixture.h" 44 | 45 | 46 | 47 | 48 | 49 | //============================================================================= 50 | // Test Fixture 51 | //----------------------------------------------------------------------------- 52 | NANO_FIXTURE(TShape) 53 | { 54 | NShape theShape; 55 | }; 56 | 57 | 58 | 59 | 60 | 61 | //============================================================================= 62 | // Test Case 63 | //----------------------------------------------------------------------------- 64 | NANO_TEST(TShape, "Default") 65 | { 66 | 67 | 68 | // Perform the test 69 | REQUIRE(theShape.IsEmpty()); 70 | } 71 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Graphics/TTransform.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TTransform.cpp 3 | 4 | DESCRIPTION: 5 | NTransform tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NTestFixture.h" 43 | #include "NTransform.h" 44 | 45 | 46 | 47 | 48 | 49 | //============================================================================= 50 | // Test Fixture 51 | //----------------------------------------------------------------------------- 52 | NANO_FIXTURE(TTransform) 53 | { 54 | NTransform theTransform; 55 | }; 56 | 57 | 58 | 59 | 60 | 61 | //============================================================================= 62 | // Test Case 63 | //----------------------------------------------------------------------------- 64 | NANO_TEST(TTransform, "Default") 65 | { 66 | 67 | 68 | // Perform the test 69 | REQUIRE(theTransform.IsIdentity()); 70 | } 71 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Network/TMessageClient.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TMessageClient.cpp 3 | 4 | DESCRIPTION: 5 | NMessageClient tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NTestFixture.h" 18 | 19 | 20 | 21 | 22 | 23 | //============================================================================ 24 | // Test fixture 25 | //---------------------------------------------------------------------------- 26 | #define TEST_NMESSAGECLIENT(...) TEST_NANO(TMessageClient, ##__VA_ARGS__) 27 | 28 | FIXTURE_NANO(TMessageClient) 29 | { 30 | }; 31 | 32 | 33 | 34 | 35 | 36 | //============================================================================ 37 | // Test case 38 | //---------------------------------------------------------------------------- 39 | TEST_NMESSAGECLIENT("Default") 40 | { 41 | 42 | 43 | // Perform the test 44 | // Test by TMessageServer 45 | } 46 | 47 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Network/TNetworkManager.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TNetworkManager.cpp 3 | 4 | DESCRIPTION: 5 | NNetworkManager tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NNetworkManager.h" 18 | #include "NTestFixture.h" 19 | 20 | 21 | 22 | 23 | 24 | //============================================================================ 25 | // Test fixture 26 | //---------------------------------------------------------------------------- 27 | #define TEST_NNETWORKMANAGER(...) TEST_NANO(TNetworkManager, ##__VA_ARGS__) 28 | 29 | FIXTURE_NANO(TNetworkManager) 30 | { 31 | NNetworkManager *netManager; 32 | 33 | SETUP 34 | { 35 | netManager = NNetworkManager::Get(); 36 | } 37 | }; 38 | 39 | 40 | 41 | 42 | 43 | //============================================================================ 44 | // Test case 45 | //---------------------------------------------------------------------------- 46 | TEST_NNETWORKMANAGER("Connection") 47 | { NString theResult; 48 | 49 | 50 | 51 | // Perform the test 52 | REQUIRE(netManager->IsReachable("http://www.apple.com/")); 53 | 54 | theResult = netManager->GetUserAgent(); 55 | REQUIRE(!theResult.IsEmpty()); 56 | } 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Network/TNetworkMessage.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TNetworkMessage.cpp 3 | 4 | DESCRIPTION: 5 | NNetworkMessage tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NTestFixture.h" 18 | 19 | 20 | 21 | 22 | 23 | //============================================================================ 24 | // Test fixture 25 | //---------------------------------------------------------------------------- 26 | #define TEST_NNETWORKMESSAGE(...) TEST_NANO(TNetworkMessage, ##__VA_ARGS__) 27 | 28 | FIXTURE_NANO(TNetworkMessage) 29 | { 30 | }; 31 | 32 | 33 | 34 | 35 | 36 | //============================================================================ 37 | // Test case 38 | //---------------------------------------------------------------------------- 39 | TEST_NNETWORKMESSAGE("Default") 40 | { 41 | 42 | 43 | // Perform the test 44 | // Test by TMessageServer 45 | } 46 | 47 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Network/TNetworkService.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TNetworkService.cpp 3 | 4 | DESCRIPTION: 5 | NNetworkService tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NTestFixture.h" 18 | 19 | 20 | 21 | 22 | 23 | //============================================================================ 24 | // Test fixture 25 | //---------------------------------------------------------------------------- 26 | #define TEST_NNETWORKSERVICE(...) TEST_NANO(TNetworkService, ##__VA_ARGS__) 27 | 28 | FIXTURE_NANO(TNetworkService) 29 | { 30 | }; 31 | 32 | 33 | 34 | 35 | 36 | //============================================================================ 37 | // Test case 38 | //---------------------------------------------------------------------------- 39 | TEST_NNETWORKSERVICE("Default") 40 | { 41 | 42 | 43 | // Perform the test 44 | // Test by TNetworkBrowser 45 | } 46 | 47 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Network/TURLRequest.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TURLRequest.cpp 3 | 4 | DESCRIPTION: 5 | NURLRequest tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NTestFixture.h" 18 | #include "NURLRequest.h" 19 | 20 | 21 | 22 | 23 | 24 | //============================================================================ 25 | // Test fixture 26 | //---------------------------------------------------------------------------- 27 | #define TEST_NURLREQUEST(...) TEST_NANO(TURLRequest, ##__VA_ARGS__) 28 | 29 | FIXTURE_NANO(TURLRequest) 30 | { 31 | }; 32 | 33 | 34 | 35 | 36 | 37 | //============================================================================ 38 | // Test case 39 | //---------------------------------------------------------------------------- 40 | TEST_NURLREQUEST("Default") 41 | { 42 | 43 | 44 | // Perform the test 45 | // Test by TURLResponse 46 | } 47 | 48 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Network/TURLResponse.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TURLResponse.cpp 3 | 4 | DESCRIPTION: 5 | NURLResponse tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NTestFixture.h" 18 | #include "NURLResponse.h" 19 | 20 | 21 | 22 | 23 | 24 | //============================================================================ 25 | // Test fixture 26 | //---------------------------------------------------------------------------- 27 | #define TEST_NURLRESPONSE(...) TEST_NANO(TURLResponse, ##__VA_ARGS__) 28 | 29 | FIXTURE_NANO(TURLResponse) 30 | { 31 | NURLResponse *theResponse; 32 | NURLRequest theRequest; 33 | 34 | SETUP 35 | { 36 | theRequest = NURLRequest("http://www.refnum.com/"); 37 | theResponse = new NURLResponse(theRequest); 38 | } 39 | 40 | TEARDOWN 41 | { 42 | delete theResponse; 43 | } 44 | }; 45 | 46 | 47 | 48 | 49 | 50 | //============================================================================ 51 | // Test case 52 | //---------------------------------------------------------------------------- 53 | TEST_NURLRESPONSE("Normal") 54 | { NData theData; 55 | NStatus theErr; 56 | 57 | 58 | 59 | // Perform the test 60 | theErr = theResponse->WaitForReply(theData); 61 | REQUIRE_NOERR(theErr); 62 | REQUIRE(NString(theData).Contains("refNum Software")); 63 | } 64 | 65 | 66 | 67 | 68 | 69 | //============================================================================ 70 | // Test case 71 | //---------------------------------------------------------------------------- 72 | TEST_NURLRESPONSE("Cancel") 73 | { 74 | 75 | 76 | // Perform the test 77 | theResponse->Start(); 78 | #if NN_TARGET_WINDOWS 79 | NN_LOG("NURLRequest::Cancel not supported from console apps"); 80 | #else 81 | theResponse->Cancel(); 82 | #endif 83 | } 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Std/TStdMemory.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TStdMemory.cpp 3 | 4 | DESCRIPTION: 5 | NStdMemory tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NStdMemory.h" 43 | #include "NTestFixture.h" 44 | 45 | 46 | 47 | 48 | 49 | //============================================================================= 50 | // Test Fixture 51 | //----------------------------------------------------------------------------- 52 | NANO_FIXTURE(TStdMemory){}; 53 | 54 | 55 | 56 | 57 | 58 | //============================================================================= 59 | // Test Case 60 | //----------------------------------------------------------------------------- 61 | NANO_TEST(TStdMemory, "nstd:aligned_to") 62 | { 63 | 64 | 65 | // Perform the test 66 | REQUIRE(nstd::aligned_to(1024, 2)); 67 | REQUIRE(!nstd::aligned_to(1024, 3)); 68 | } 69 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/System/TLocale.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TLocale.cpp 3 | 4 | DESCRIPTION: 5 | NLocale tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NTestFixture.h" 18 | #include "NLocale.h" 19 | 20 | 21 | 22 | 23 | 24 | //============================================================================ 25 | // Test fixture 26 | //---------------------------------------------------------------------------- 27 | #define TEST_NLOCALE(...) TEST_NANO(TLocale, ##__VA_ARGS__) 28 | 29 | FIXTURE_NANO(TLocale) 30 | { 31 | NLocale theLocale; 32 | }; 33 | 34 | 35 | 36 | 37 | 38 | //============================================================================ 39 | // Test case 40 | //---------------------------------------------------------------------------- 41 | TEST_NLOCALE("Default") 42 | { bool valueBool; 43 | 44 | 45 | 46 | // Perform the test 47 | valueBool = theLocale.IsMetric(); 48 | REQUIRE((valueBool == true || valueBool == false)); 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/System/TXMLParser.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TXMLParser.cpp 3 | 4 | DESCRIPTION: 5 | NXMLParser tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NTestFixture.h" 43 | #include "NXMLParser.h" 44 | 45 | 46 | 47 | 48 | 49 | //============================================================================= 50 | // Test Fixture 51 | //----------------------------------------------------------------------------- 52 | NANO_FIXTURE(TXMLParser) 53 | { 54 | NXMLParser theParser; 55 | }; 56 | 57 | 58 | 59 | 60 | 61 | //============================================================================= 62 | // Test Case 63 | //----------------------------------------------------------------------------- 64 | NANO_TEST(TXMLParser, "Default") 65 | { 66 | 67 | 68 | // Perform the test 69 | REQUIRE(theParser.GetFlags() == kNXMLParseDefault); 70 | } 71 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Threads/TReadWriteLock.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TReadWriteLock.cpp 3 | 4 | DESCRIPTION: 5 | NReadWriteLock tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | //============================================================================ 15 | // Include files 16 | //---------------------------------------------------------------------------- 17 | #include "NReadWriteLock.h" 18 | #include "NTestFixture.h" 19 | 20 | #include "CTestUtilities.h" 21 | 22 | 23 | 24 | 25 | 26 | //============================================================================ 27 | // Test fixture 28 | //---------------------------------------------------------------------------- 29 | #define TEST_NREADWRITELOCK(...) TEST_NANO(TReadWriteLock, ##__VA_ARGS__) 30 | 31 | FIXTURE_NANO(TReadWriteLock) 32 | { 33 | NReadWriteLock theLock; 34 | }; 35 | 36 | 37 | 38 | 39 | 40 | //============================================================================ 41 | // Test case 42 | //---------------------------------------------------------------------------- 43 | TEST_NREADWRITELOCK("Basic") 44 | { 45 | 46 | 47 | // Perform the test 48 | REQUIRE(CTestUtilities::TestLock(&theLock)); 49 | } 50 | 51 | 52 | 53 | 54 | 55 | //============================================================================ 56 | // Test case 57 | //---------------------------------------------------------------------------- 58 | TEST_NREADWRITELOCK("Readers") 59 | { 60 | 61 | 62 | // Perform the test 63 | theLock.LockForRead(); 64 | REQUIRE(theLock.IsLocked()); 65 | 66 | theLock.LockForRead(); 67 | REQUIRE(theLock.IsLocked()); 68 | 69 | theLock.Lock(); 70 | REQUIRE(theLock.IsLocked()); 71 | 72 | theLock.Unlock(); 73 | REQUIRE(theLock.IsLocked()); 74 | 75 | theLock.UnlockForRead(); 76 | REQUIRE(theLock.IsLocked()); 77 | 78 | theLock.UnlockForRead(); 79 | REQUIRE(!theLock.IsLocked()); 80 | } 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Threads/TThreadGroup.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TThreadGroup.cpp 3 | 4 | DESCRIPTION: 5 | NThreadGroup tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NDebug.h" 43 | #include "NTestFixture.h" 44 | #include "NThreadGroup.h" 45 | 46 | 47 | 48 | 49 | 50 | //============================================================================= 51 | // Fixture 52 | //----------------------------------------------------------------------------- 53 | NANO_FIXTURE(TThreadGroup){}; 54 | 55 | 56 | 57 | 58 | 59 | //============================================================================= 60 | // Test Case 61 | //----------------------------------------------------------------------------- 62 | NANO_TEST(TThreadGroup, "Default") 63 | { 64 | 65 | 66 | // Perform the test 67 | NN_LOG_UNIMPLEMENTED(); 68 | } 69 | -------------------------------------------------------------------------------- /NanoTest/Source/Nano/Threads/TThreadTask.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | TThreadTask.cpp 3 | 4 | DESCRIPTION: 5 | NThreadTask tests. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #include "NTestFixture.h" 43 | #include "NThreadTask.h" 44 | 45 | 46 | 47 | 48 | 49 | //============================================================================= 50 | // Fixture 51 | //----------------------------------------------------------------------------- 52 | NANO_FIXTURE(TThreadTask){}; 53 | 54 | 55 | 56 | 57 | 58 | //============================================================================= 59 | // Test Case 60 | //----------------------------------------------------------------------------- 61 | NANO_TEST(TThreadTask, "Default") 62 | { 63 | 64 | 65 | // Perform the test 66 | NN_LOG_UNIMPLEMENTED(); 67 | } 68 | -------------------------------------------------------------------------------- /NanoTest/Source/NanoTest Prefix.h: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NanoTest Prefix.h 3 | 4 | DESCRIPTION: 5 | NanoTest Prefix. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2013, refNum Software 9 | 10 | 11 | All rights reserved. Released under the terms of licence.html. 12 | __________________________________________________________________________ 13 | */ 14 | #ifndef NANOTEST_PREFIX_HDR 15 | #define NANOTEST_PREFIX_HDR 16 | //============================================================================ 17 | // Include files 18 | //---------------------------------------------------------------------------- 19 | #include "Nano.h" 20 | 21 | 22 | 23 | 24 | #endif // NANOTEST_PREFIX_HDR 25 | 26 | 27 | -------------------------------------------------------------------------------- /NanoTest/Source/NanoTest.cpp: -------------------------------------------------------------------------------- 1 | /* NAME: 2 | NanoTest.cpp 3 | 4 | DESCRIPTION: 5 | NanoTest app. 6 | 7 | COPYRIGHT: 8 | Copyright (c) 2006-2021, refNum Software 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | ___________________________________________________________________________ 38 | */ 39 | //============================================================================= 40 | // Includes 41 | //----------------------------------------------------------------------------- 42 | #define CATCH_CONFIG_RUNNER 43 | 44 | #include "NTestFixture.h" 45 | 46 | 47 | 48 | 49 | 50 | //============================================================================= 51 | // main : Program entry point. 52 | //----------------------------------------------------------------------------- 53 | int main(int argc, char* argv[]) 54 | { 55 | 56 | 57 | // Execute the tests 58 | return Catch::Session().run(argc, argv); 59 | } 60 | -------------------------------------------------------------------------------- /NanoTest/Support/Xcode/NanoTest.xcconfig: -------------------------------------------------------------------------------- 1 | //============================================================================ 2 | // Compiler - Header Search Paths 3 | //---------------------------------------------------------------------------- 4 | USER_HEADER_SEARCH_PATHS = $(Nano_UHSP) 5 | 6 | 7 | 8 | 9 | 10 | //============================================================================= 11 | // Compiler - Misc 12 | //----------------------------------------------------------------------------- 13 | GCC_PREFIX_HEADER = 14 | 15 | 16 | 17 | 18 | 19 | //============================================================================= 20 | // Linker 21 | //----------------------------------------------------------------------------- 22 | PRODUCT_NAME = NanoTest_$(NANO_PLATFORM) 23 | OTHER_LDFLAGS = $(inherited) $(Nano_LinkFlags) 24 | 25 | -------------------------------------------------------------------------------- /NanoTest/Support/Xcode/NanoTest_iOS.xcconfig: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // iOS 3 | //----------------------------------------------------------------------------- 4 | #include "../../../Library/Support/Xcode/Nano_iOS.xcconfig" 5 | #include "NanoTest.xcconfig" 6 | 7 | 8 | -------------------------------------------------------------------------------- /NanoTest/Support/Xcode/NanoTest_macOS.xcconfig: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // macOS 3 | //----------------------------------------------------------------------------- 4 | #include "../../../Library/Support/Xcode/Nano_macOS.xcconfig" 5 | #include "NanoTest.xcconfig" 6 | 7 | 8 | -------------------------------------------------------------------------------- /NanoTest/Support/Xcode/NanoTest_tvOS.xcconfig: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // tvOS 3 | //----------------------------------------------------------------------------- 4 | #include "../../../Library/Support/Xcode/Nano_tvOS.xcconfig" 5 | #include "NanoTest.xcconfig" 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nano 2 | Nano is a C++ library for developing high-performance applications for macOS, iOS, tvOS, Android, Linux, and Microsoft Windows. 3 | 4 | Nano provides a set of cross-platform data types such as strings or dictionaries, and a unified interface to platform-specific APIs like preferences, threads, or sockets. 5 | 6 | Nano is Open Source and distributed under the BSD licence. 7 | 8 | 9 | ## Status 10 | 11 | | | | 12 | | -----------------------------------------------------------------------------------: | ---------------------------------------------------------------------------------: | 13 | | ![Build macOS](https://github.com/refnum/nano/workflows/Build%20macOS/badge.svg) | ![Test macOS](https://github.com/refnum/nano/workflows/Test%20macOS/badge.svg) | 14 | | ![Build iOS](https://github.com/refnum/nano/workflows/Build%20iOS/badge.svg) | ![Test iOS](https://github.com/refnum/nano/workflows/Test%20iOS/badge.svg) | 15 | | ![Build tvOS](https://github.com/refnum/nano/workflows/Build%20tvOS/badge.svg) | ![Test tvOS](https://github.com/refnum/nano/workflows/Test%20tvOS/badge.svg) | 16 | | ![Build Linux](https://github.com/refnum/nano/workflows/Build%20Linux/badge.svg) | ![Test Linux](https://github.com/refnum/nano/workflows/Test%20Linux/badge.svg) | 17 | | ![Build Android](https://github.com/refnum/nano/workflows/Build%20Android/badge.svg) | ![Test Android](https://github.com/refnum/nano/workflows/Test%20Android/badge.svg) | 18 | | ![Build Windows](https://github.com/refnum/nano/workflows/Build%20Windows/badge.svg) | ![Test Windows](https://github.com/refnum/nano/workflows/Test%20Windows/badge.svg) | 19 | 20 | --------------------------------------------------------------------------------